diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:04 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:47 -0500 |
| commit | a06baa56b95674fc626b3c3fd680d6a65357fe60 (patch) | |
| tree | cd9d867c2ca3cff5c1d6b3bd73377c44649fb075 /src/libstd/io/lazy.rs | |
| parent | 8eb7c58dbb7b32701af113bc58722d0d1fefb1eb (diff) | |
| download | rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.tar.gz rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.zip | |
Format the world
Diffstat (limited to 'src/libstd/io/lazy.rs')
| -rw-r--r-- | src/libstd/io/lazy.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/io/lazy.rs b/src/libstd/io/lazy.rs index e864aa2c864..1968d498bbe 100644 --- a/src/libstd/io/lazy.rs +++ b/src/libstd/io/lazy.rs @@ -11,16 +11,15 @@ pub struct Lazy<T> { } #[inline] -const fn done<T>() -> *mut Arc<T> { 1_usize as *mut _ } +const fn done<T>() -> *mut Arc<T> { + 1_usize as *mut _ +} unsafe impl<T> Sync for Lazy<T> {} impl<T> Lazy<T> { pub const fn new() -> Lazy<T> { - Lazy { - lock: Mutex::new(), - ptr: Cell::new(ptr::null_mut()), - } + Lazy { lock: Mutex::new(), ptr: Cell::new(ptr::null_mut()) } } } |
