File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ pub(crate) enum BuiltinKind {
2525
2626/// A builtin function. Used for lazy initialization of builtins.
2727
28- #[ derive( Clone , Finalize ) ]
28+ #[ derive( Clone , Finalize , Debug ) ]
29+ #[ allow( clippy:: type_complexity) ]
2930pub struct LazyBuiltIn {
3031 pub ( crate ) init_and_realm : Option < ( fn ( & Realm ) , WeakGc < RealmInner > ) > ,
3132 pub ( crate ) kind : BuiltinKind ,
Original file line number Diff line number Diff line change @@ -70,10 +70,23 @@ pub struct RealmInner {
7070 template_map : GcRefCell < FxHashMap < u64 , JsObject > > ,
7171 loaded_modules : GcRefCell < FxHashMap < JsString , Module > > ,
7272 host_classes : GcRefCell < FxHashMap < TypeId , StandardConstructor > > ,
73-
7473 host_defined : GcRefCell < HostDefined > ,
7574}
7675
76+ #[ allow( clippy:: missing_fields_in_debug) ]
77+ impl std:: fmt:: Debug for RealmInner {
78+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
79+ f. debug_struct ( "RealmInner" )
80+ . field ( "intrinsics" , & self . intrinsics )
81+ . field ( "environment" , & self . environment )
82+ . field ( "global_object" , & self . global_object )
83+ . field ( "global_this" , & self . global_this )
84+ . field ( "template_map" , & self . template_map )
85+ . field ( "loaded_modules" , & self . loaded_modules )
86+ . field ( "host_classes" , & self . host_classes )
87+ . finish ( )
88+ }
89+ }
7790impl Realm {
7891 /// Create a new [`Realm`].
7992 #[ inline]
You can’t perform that action at this time.
0 commit comments