File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ impl fmt::Display for Version {
105
105
/// The main meat: actually does the hashing and does some verification with
106
106
/// the cost to ensure it's a correct one
107
107
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) {
109
109
return Err ( BcryptError :: CostNotAllowed ( cost) ) ;
110
110
}
111
111
if password. contains ( & 0u8 ) {
Original file line number Diff line number Diff line change @@ -294,10 +294,12 @@ fn lint_command(ctx: CallContext) -> Result<JsBoolean> {
294
294
let file_content = fs:: read_to_string ( & p)
295
295
. map_err ( |e| Error :: from_reason ( format ! ( "Read file {:?} failed: {}" , p, e) ) ) ?;
296
296
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
+ } ;
301
303
let syntax = Syntax :: Typescript ( ts_config) ;
302
304
let mut linter = LinterBuilder :: default ( )
303
305
. rules ( if enable_all_rules {
You can’t perform that action at this time.
0 commit comments