Skip to content

Commit

Permalink
Rebase, fix clipy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Apr 27, 2024
1 parent 3ea16cb commit 23e4b4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions crates/red_knot/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#![allow(clippy::dbg_macro)]

use std::collections::hash_map::Entry;
use std::num::NonZeroUsize;
use std::path::Path;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
use std::sync::Mutex;

use rustc_hash::FxHashMap;
use tracing::subscriber::Interest;
Expand Down
10 changes: 5 additions & 5 deletions crates/red_knot/src/program/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct RayonCheckScheduler<'program, 'scope_ref, 'scope> {

impl<'program, 'scope_ref, 'scope> RayonCheckScheduler<'program, 'scope_ref, 'scope> {
pub fn new(program: &'program Program, scope: &'scope_ref rayon::Scope<'scope>) -> Self {
Self { scope, program }
Self { program, scope }
}
}

Expand Down Expand Up @@ -117,7 +117,7 @@ impl<'a> SameThreadCheckScheduler<'a> {

impl CheckScheduler for SameThreadCheckScheduler<'_> {
fn check_file(&self, task: CheckFileTask) {
task.run(self.program)
task.run(self.program);
}

fn max_concurrency(&self) -> Option<NonZeroUsize> {
Expand Down Expand Up @@ -166,8 +166,8 @@ impl CheckContext {
sender: crossbeam_channel::Sender<CheckFileMessage>,
) -> Self {
Self {
sender,
cancellation_token,
sender,
}
}

Expand Down Expand Up @@ -224,13 +224,13 @@ impl<'a> CheckFilesLoop<'a> {
self.queue_file(file, context.clone())?;
}

self.run_impl(receiver, context)
self.run_impl(receiver, &context)
}

fn run_impl(
mut self,
receiver: crossbeam_channel::Receiver<CheckFileMessage>,
context: CheckContext,
context: &CheckContext,
) -> Result<Vec<String>, CheckError> {
if self.cancellation_token.is_cancelled() {
return Err(CheckError::Cancelled);
Expand Down

0 comments on commit 23e4b4c

Please sign in to comment.