@@ -163,6 +163,7 @@ pub struct OopObject {
163
163
this_entries : Cc < GcHashMap < IStr , ObjMember > > ,
164
164
value_cache : RefCell < GcHashMap < ( IStr , Option < WeakObjValue > ) , CacheValue > > ,
165
165
}
166
+ #[ allow( clippy:: missing_fields_in_debug) ]
166
167
impl Debug for OopObject {
167
168
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
168
169
f. debug_struct ( "OopObject" )
@@ -347,7 +348,7 @@ impl ObjValue {
347
348
out. with_super ( self ) ;
348
349
let mut member = out. field ( key) ;
349
350
if value. flags . add ( ) {
350
- member = member. add ( )
351
+ member = member. add ( ) ;
351
352
}
352
353
if let Some ( loc) = value. location {
353
354
member = member. with_location ( loc) ;
@@ -395,7 +396,7 @@ impl ObjValue {
395
396
396
397
pub fn get ( & self , key : IStr ) -> Result < Option < Val > > {
397
398
self . run_assertions ( ) ?;
398
- self . get_for ( key, self . 0 . this ( ) . unwrap_or ( self . clone ( ) ) )
399
+ self . get_for ( key, self . 0 . this ( ) . unwrap_or_else ( || self . clone ( ) ) )
399
400
}
400
401
401
402
pub fn get_for ( & self , key : IStr , this : ObjValue ) -> Result < Option < Val > > {
@@ -474,7 +475,7 @@ impl ObjValue {
474
475
type Output = Val ;
475
476
476
477
fn get ( self : Box < Self > ) -> Result < Self :: Output > {
477
- Ok ( self . obj . get_or_bail ( self . key ) ? )
478
+ self . obj . get_or_bail ( self . key )
478
479
}
479
480
}
480
481
@@ -495,7 +496,7 @@ impl ObjValue {
495
496
SuperDepth :: default ( ) ,
496
497
& mut |depth, index, name, visibility| {
497
498
let new_sort_key = FieldSortKey :: new ( depth, index) ;
498
- let entry = out. entry ( name. clone ( ) ) ;
499
+ let entry = out. entry ( name) ;
499
500
let ( visible, _) = entry. or_insert ( ( true , new_sort_key) ) ;
500
501
match visibility {
501
502
Visibility :: Normal => { }
@@ -634,7 +635,7 @@ impl OopObject {
634
635
SuperDepth :: default ( ) ,
635
636
& mut |depth, index, name, visibility| {
636
637
let new_sort_key = FieldSortKey :: new ( depth, index) ;
637
- let entry = out. entry ( name. clone ( ) ) ;
638
+ let entry = out. entry ( name) ;
638
639
let ( visible, _) = entry. or_insert ( ( true , new_sort_key) ) ;
639
640
match visibility {
640
641
Visibility :: Normal => { }
0 commit comments