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
-
3
1
use crate :: cell:: UnsafeCell ;
4
2
use crate :: fmt;
3
+ use crate :: mem:: ManuallyDrop ;
5
4
use crate :: ops:: Deref ;
6
5
use crate :: panic:: { RefUnwindSafe , UnwindSafe } ;
7
6
use crate :: sync:: Once ;
@@ -151,12 +150,10 @@ impl<T: Default> Default for LazyLock<T> {
151
150
#[ unstable( feature = "once_cell" , issue = "74465" ) ]
152
151
impl < T : fmt:: Debug , F > fmt:: Debug for LazyLock < T , F > {
153
152
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
+ }
160
157
}
161
158
}
162
159
You can’t perform that action at this time.
0 commit comments