Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
Clippy is always adding new lints.
  • Loading branch information
julianandrews committed Feb 18, 2024
1 parent f88e3b0 commit a62a8b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn get_corpus_files(files: &[String]) -> std::io::Result<Vec<std::path::PathBuf>
fn get_data_files() -> std::io::Result<Vec<std::path::PathBuf>> {
let mut data_dirs = directories::ProjectDirs::from_path("markovpass".into())
.map(|pds| vec![pds.data_dir().to_path_buf()])
.unwrap_or_else(Vec::new);
.unwrap_or_default();
if cfg!(target_os = "linux") {
data_dirs.extend(
std::env::var("XDG_DATA_DIRS")
Expand Down
2 changes: 1 addition & 1 deletion src/markovchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<'ngrams> PassphraseMarkovChain<'ngrams> {
let next_ngram = ngrams.peek().unwrap_or(&first_ngram);
*transition_counters
.entry(current_ngram)
.or_insert_with(HashMap::new)
.or_default()
.entry(next_ngram)
.or_insert(0) += 1;
}
Expand Down

0 comments on commit a62a8b7

Please sign in to comment.