diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-01-11 19:07:22 -0600 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-01-11 19:07:22 -0600 |
commit | f96e6f042fa8ab0e61e7c10739eafd1155a32eff (patch) | |
tree | a10c41ed08cdf54c3226149605eb962c2bf3202c /src/project/git.rs | |
parent | 14b367de207df7cb57bb54512b8963ef7d3221fa (diff) |
revert(preview)!: remove preview feat and unused deps
Diffstat (limited to 'src/project/git.rs')
-rw-r--r-- | src/project/git.rs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/project/git.rs b/src/project/git.rs index 6c8f329..4584a7a 100644 --- a/src/project/git.rs +++ b/src/project/git.rs @@ -1,13 +1,11 @@ use git2::{BranchType, Repository}; use ignore::DirEntry; -use onefetch::ui::printer::Printer; -use std::io; use std::{path::PathBuf, time::Duration}; use tracing::{debug, warn}; use crate::{Error, Result}; -use super::{Preview, ProjectParser, Timestamp}; +use super::{ProjectParser, Timestamp}; #[derive(Debug, Clone)] pub struct GitMatcher; @@ -75,24 +73,6 @@ impl Timestamp for GitProject { } } -#[cfg(feature = "preview")] -impl Preview for GitProject { - type Error = Error; - - fn preview(&self) -> Result<()> { - let config = onefetch::cli::Config { - input: self.path_buf.to_owned(), - include_hidden: true, - ..Default::default() - }; - - let info = onefetch::info::Info::new(&config)?; - let mut printer = Printer::new(io::BufWriter::new(io::stdout()), info, config)?; - - printer.print().map_err(Into::into) - } -} - impl AsRef<PathBuf> for GitProject { fn as_ref(&self) -> &PathBuf { &self.path_buf |