Skip to content

Commit 5d745b4

Browse files
committed
manually fix clippy
1 parent aba8192 commit 5d745b4

File tree

3 files changed

+7
-6
lines changed
  • crates

3 files changed

+7
-6
lines changed

crates/hstr/benches/libs.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ extern crate swc_malloc;
44

55
#[macro_use]
66
extern crate criterion;
7-
use std::{hash::Hash, mem::forget};
8-
7+
use std::{hash::Hash, mem::forget, hint::black_box};
98
use compact_str::CompactString;
10-
use criterion::{black_box, BatchSize, BenchmarkId, Criterion};
9+
use criterion::{BatchSize, BenchmarkId, Criterion};
1110
use par_iter::prelude::*;
12-
use rand::distributions::{Alphanumeric, DistString};
11+
use rand::distr::{Alphanumeric, SampleString};
1312
use rustc_hash::FxHashSet;
1413
use smartstring::{LazyCompact, SmartString};
1514

@@ -326,5 +325,5 @@ criterion_group!(
326325
criterion_main!(benches);
327326

328327
fn random_string(len: usize) -> String {
329-
Alphanumeric.sample_string(&mut rand::thread_rng(), len)
328+
Alphanumeric.sample_string(&mut rand::rng(), len)
330329
}

crates/swc_ecma_compat_es2015/src/classes/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ impl Classes {
937937
}
938938

939939
#[tracing::instrument(level = "debug", skip_all)]
940+
#[allow(dead_code)]
940941
fn inject_class_call_check(c: &mut Vec<Stmt>, name: Ident) {
941942
let mut class_name_sym = name.clone();
942943
class_name_sym.span = DUMMY_SP;
@@ -958,6 +959,7 @@ fn inject_class_call_check(c: &mut Vec<Stmt>, name: Ident) {
958959

959960
/// Returns true if no `super` is used before `super()` call.
960961
#[tracing::instrument(level = "debug", skip_all)]
962+
#[allow(dead_code)]
961963
fn is_always_initialized(body: &[Stmt]) -> bool {
962964
struct SuperFinder {
963965
found: bool,

crates/swc_plugin_backend_wasmer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static ENGINE: Lazy<Mutex<wasmer::Engine>> = Lazy::new(|| {
2525
// Use empty enumset to disable simd.
2626
use enumset::EnumSet;
2727
use wasmer::sys::{BaseTunables, CompilerConfig, EngineBuilder, Target, Triple};
28-
let set = EnumSet::new();
28+
let mut set = EnumSet::new();
2929

3030
// [TODO]: Should we use is_x86_feature_detected! macro instead?
3131
#[cfg(target_arch = "x86_64")]

0 commit comments

Comments
 (0)