File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1- use crate :: mem:: ManuallyDrop ;
2-
31use crate :: cell:: UnsafeCell ;
42use crate :: fmt;
3+ use crate :: mem:: ManuallyDrop ;
54use crate :: ops:: Deref ;
65use crate :: panic:: { RefUnwindSafe , UnwindSafe } ;
76use crate :: sync:: Once ;
@@ -151,12 +150,10 @@ impl<T: Default> Default for LazyLock<T> {
151150#[ unstable( feature = "once_cell" , issue = "74465" ) ]
152151impl < T : fmt:: Debug , F > fmt:: Debug for LazyLock < T , F > {
153152 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
154- f. debug_tuple ( "LazyLock" )
155- . field ( match self . get ( ) {
156- Some ( v) => v,
157- None => & "Uninit" ,
158- } )
159- . finish ( )
153+ match self . get ( ) {
154+ Some ( v) => f. debug_tuple ( "LazyLock" ) . field ( v) . finish ( ) ,
155+ None => f. write_str ( "LazyLock(Uninit)" ) ,
156+ }
160157 }
161158}
162159
You can’t perform that action at this time.
0 commit comments