Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
opeolluwa committed Sep 6, 2023
1 parent 0ad514a commit 1f7fa5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/commands/gitignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ impl GitIgnoreCommands {
if let Some(file_content) = file_path {
let mut file = File::create(path).unwrap();
file.write_all(file_content.contents()).unwrap();
} else {
}
} else {
}
}
}
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ use crate::{style::PrintColoredText, DB_URL};
pub struct Database(pub Vec<Store>);
impl std::fmt::Display for Database {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.iter().fold(Ok(()), |result, data| {
result.and_then(|_| write!(f, "{}", data))
})
self.0.iter().try_fold((), |_, data| write!(f, "{}", data))
}
}
#[allow(unused)]
Expand Down

0 comments on commit 1f7fa5f

Please sign in to comment.