Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Aug 6, 2024
1 parent 15e338b commit 906bed0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/treereduce/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ mod tests {
Ok(())
}

fn try_wait(&self, state: &mut Self::State) -> io::Result<Option<bool>> {
fn try_wait(&self, _state: &mut Self::State) -> io::Result<Option<bool>> {
Ok(Some(true))
}

fn wait(&self, state: Self::State) -> io::Result<bool> {
fn wait(&self, _state: Self::State) -> io::Result<bool> {
Ok(true)
}
}
Expand All @@ -47,11 +47,11 @@ mod tests {
Ok(())
}

fn try_wait(&self, state: &mut Self::State) -> io::Result<Option<bool>> {
fn try_wait(&self, _state: &mut Self::State) -> io::Result<Option<bool>> {
Ok(Some(false))
}

fn wait(&self, state: Self::State) -> io::Result<bool> {
fn wait(&self, _state: Self::State) -> io::Result<bool> {
Ok(false)
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/treereduce/src/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ where
// Ok(self.tasks.wait_pop(point_o_one_seconds)?.map(|pt| pt.task))
let task = self.tasks.pop()?;
debug_assert!(
task.as_ref().map(|t| t.priority).unwrap_or(std::usize::MAX) >= self.min_task_size
task.as_ref().map(|t| t.priority).unwrap_or(usize::MAX) >= self.min_task_size
);
Ok(task)
}
Expand Down Expand Up @@ -608,7 +608,7 @@ pub fn treereduce_multi_pass<T: Clone + Check + Debug + Send + Sync + 'static>(
stats.start_size = orig.text.len();
let reduce_start = Instant::now();
let mut passes_done = 0;
while passes_done < max_passes.unwrap_or(std::usize::MAX) {
while passes_done < max_passes.unwrap_or(usize::MAX) {
let pass_start_size = orig.text.len();
info!(
"Starting pass {} / {}",
Expand Down

0 comments on commit 906bed0

Please sign in to comment.