diff options
| author | mo8it <mo8it@proton.me> | 2024-10-17 15:03:43 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-10-17 15:03:43 +0200 |
| commit | 7e2f56f41a89213d3ae60a069402a25b570f0cca (patch) | |
| tree | d10a0d1f54311edda5bea57644f929152e8e7dd2 /src/dev/check.rs | |
| parent | e90f5f03f3da639bf3157aec12ebf0cec62ac7ae (diff) | |
Use the default hasher
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 119fed5..956c2be 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -1,6 +1,7 @@ use anyhow::{anyhow, bail, Context, Error, Result}; use std::{ cmp::Ordering, + collections::HashSet, fs::{self, read_dir, OpenOptions}, io::{self, Read, Write}, path::{Path, PathBuf}, @@ -11,7 +12,6 @@ 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, @@ -53,8 +53,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 = hash_set_with_capacity(info_file.exercises.len()); - let mut paths = hash_set_with_capacity(info_file.exercises.len()); + let mut names = HashSet::with_capacity(info_file.exercises.len()); + let mut paths = HashSet::with_capacity(info_file.exercises.len()); let mut file_buf = String::with_capacity(1 << 14); for exercise_info in &info_file.exercises { @@ -282,7 +282,7 @@ fn check_solutions( .collect::<Result<Vec<_>, _>>() .context("Failed to spawn a thread to check a solution")?; - let mut sol_paths = hash_set_with_capacity(info_file.exercises.len()); + let mut sol_paths = HashSet::with_capacity(info_file.exercises.len()); let mut fmt_cmd = Command::new("rustfmt"); fmt_cmd .arg("--check") |
