Skip to content

Commit

Permalink
📎 clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdstanford committed Jan 21, 2025
1 parent 4031d65 commit fc3eff4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/audit_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ impl AuditFile {

pub fn has_unsafe_effect(&self) -> bool {
fn tree_walk(tree: &EffectTree) -> bool {
return match tree {
match tree {
EffectTree::Leaf(_, SafetyAnnotation::Unsafe) => true,
EffectTree::Branch(_, ts) => ts.iter().any(tree_walk),
_ => false,
};
}
}
self.audit_trees.values().any(tree_walk)
}
Expand Down
4 changes: 2 additions & 2 deletions src/bin/scan_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ fn main() {
let mut all_stats = AllStats::new(crates.clone());

let batch_size = args.num_threads * 5;
let num_batches = (num_crates + batch_size - 1) / batch_size;
let progress_inc = (num_crates + PROGRESS_INCS - 1) / PROGRESS_INCS;
let num_batches = num_crates.div_ceil(batch_size);
let progress_inc = num_crates.div_ceil(PROGRESS_INCS);

for batch in 0..num_batches {
let pool = ThreadPool::new(args.num_threads);
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl Serialize for CrateId {

struct CrateIdVisitor;

impl<'de> Visitor<'de> for CrateIdVisitor {
impl Visitor<'_> for CrateIdVisitor {
type Value = CrateId;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down

0 comments on commit fc3eff4

Please sign in to comment.