Skip to content

Commit 1fb7b44

Browse files
committed
chore: make clippy happy
1 parent 147a2a8 commit 1fb7b44

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packages/bcrypt/src/lib_bcrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl fmt::Display for Version {
105105
/// The main meat: actually does the hashing and does some verification with
106106
/// the cost to ensure it's a correct one
107107
fn _hash_password(password: &[u8], cost: u32, salt: &[u8]) -> BcryptResult<HashParts> {
108-
if cost > MAX_COST || cost < MIN_COST {
108+
if !(MIN_COST..=MAX_COST).contains(&cost) {
109109
return Err(BcryptError::CostNotAllowed(cost));
110110
}
111111
if password.contains(&0u8) {

packages/deno-lint/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ fn lint_command(ctx: CallContext) -> Result<JsBoolean> {
294294
let file_content = fs::read_to_string(&p)
295295
.map_err(|e| Error::from_reason(format!("Read file {:?} failed: {}", p, e)))?;
296296

297-
let mut ts_config = TsConfig::default();
298-
ts_config.dynamic_import = true;
299-
ts_config.decorators = true;
300-
ts_config.tsx = p.ends_with(".tsx");
297+
let ts_config = TsConfig {
298+
dynamic_import: true,
299+
decorators: true,
300+
tsx: p.ends_with(".tsx"),
301+
..Default::default()
302+
};
301303
let syntax = Syntax::Typescript(ts_config);
302304
let mut linter = LinterBuilder::default()
303305
.rules(if enable_all_rules {

0 commit comments

Comments
 (0)