File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
// Original work Copyright (c) 2014 The Rust Project Developers
2
- // Modified work Copyright (c) 2016-2017 Nikita Pekin and the lazycell contributors
2
+ // Modified work Copyright (c) 2016-2018 Nikita Pekin and the lazycell contributors
3
3
// See the README.md file at the top-level directory of this distribution.
4
4
//
5
5
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
@@ -63,7 +63,7 @@ impl<T> LazyCell<T> {
63
63
///
64
64
/// This function will return `Err(value)` is the cell is already full.
65
65
pub fn fill ( & self , value : T ) -> Result < ( ) , T > {
66
- let mut slot = unsafe { & mut * self . inner . get ( ) } ;
66
+ let slot = unsafe { & mut * self . inner . get ( ) } ;
67
67
if slot. is_some ( ) {
68
68
return Err ( value) ;
69
69
}
@@ -135,7 +135,7 @@ impl<T> LazyCell<T> {
135
135
136
136
/// Consumes this `LazyCell`, returning the underlying value.
137
137
pub fn into_inner ( self ) -> Option < T > {
138
- unsafe { self . inner . into_inner ( ) }
138
+ self . inner . into_inner ( )
139
139
}
140
140
}
141
141
@@ -206,7 +206,7 @@ impl<T> AtomicLazyCell<T> {
206
206
207
207
/// Consumes this `LazyCell`, returning the underlying value.
208
208
pub fn into_inner ( self ) -> Option < T > {
209
- unsafe { self . inner . into_inner ( ) }
209
+ self . inner . into_inner ( )
210
210
}
211
211
}
212
212
You can’t perform that action at this time.
0 commit comments