File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ impl Compiler {
366366 self . libraries_with_known_members . push ( lib. clone ( ) ) ;
367367 }
368368 self . library_constants
369- . get_or_insert_with ( HashMap :: new )
369+ . get_or_insert_default ( )
370370 . insert ( ( lib, member) , r#const. into ( ) ) ;
371371 self
372372 }
@@ -666,7 +666,7 @@ impl Chunk<'_> {
666666 && self . detect_mode ( ) == ChunkMode :: Text
667667 {
668668 #[ cfg( feature = "luau" ) ]
669- if let Ok ( data) = self . compiler . get_or_insert_with ( Default :: default ) . compile ( source) {
669+ if let Ok ( data) = self . compiler . get_or_insert_default ( ) . compile ( source) {
670670 self . source = Ok ( Cow :: Owned ( data) ) ;
671671 self . mode = Some ( ChunkMode :: Binary ) ;
672672 }
Original file line number Diff line number Diff line change @@ -1126,7 +1126,7 @@ impl RawLua {
11261126 #[ cfg( feature = "luau" ) ]
11271127 if registry. enable_namecall {
11281128 let map: & mut rustc_hash:: FxHashMap < _ , crate :: types:: CallbackPtr > =
1129- methods_map. get_or_insert_with ( Default :: default ) ;
1129+ methods_map. get_or_insert_default ( ) ;
11301130 for ( k, m) in & registry. methods {
11311131 map. insert ( k. as_bytes ( ) . to_vec ( ) , & * * m) ;
11321132 }
You can’t perform that action at this time.
0 commit comments