diff options
| author | mo8it <mo8it@proton.me> | 2024-08-08 23:46:21 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-08-08 23:48:54 +0200 |
| commit | e41c3a7c925387ca2c2441b4f41c963b95bc828d (patch) | |
| tree | 02cf55dc72a489b6908141eabf57b48dfdc6cb45 /src/dev/check.rs | |
| parent | 1b9faa4d61665074fe450277644974dd0167e6e9 (diff) | |
Use fixed seeds with ahash
Diffstat (limited to 'src/dev/check.rs')
| -rw-r--r-- | src/dev/check.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs index 7b17274..ca1b30c 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -1,4 +1,3 @@ -use ahash::{HashSet, HashSetExt}; use anyhow::{anyhow, bail, Context, Error, Result}; use std::{ cmp::Ordering, @@ -12,6 +11,7 @@ use std::{ use crate::{ cargo_toml::{append_bins, bins_start_end_ind, BINS_BUFFER_CAPACITY}, cmd::CmdRunner, + collections::{hash_set_with_capacity, HashSet}, exercise::{RunnableExercise, OUTPUT_CAPACITY}, info_file::{ExerciseInfo, InfoFile}, CURRENT_FORMAT_VERSION, @@ -50,8 +50,8 @@ fn check_cargo_toml( // Check the info of all exercises and return their paths in a set. fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> { - let mut names = HashSet::with_capacity(info_file.exercises.len()); - let mut paths = HashSet::with_capacity(info_file.exercises.len()); + let mut names = hash_set_with_capacity(info_file.exercises.len()); + let mut paths = hash_set_with_capacity(info_file.exercises.len()); let mut file_buf = String::with_capacity(1 << 14); for exercise_info in &info_file.exercises { @@ -251,7 +251,7 @@ fn check_solutions( }) .collect::<Vec<_>>(); - let mut sol_paths = HashSet::with_capacity(info_file.exercises.len()); + let mut sol_paths = hash_set_with_capacity(info_file.exercises.len()); let mut fmt_cmd = Command::new("rustfmt"); fmt_cmd .arg("--check") |
