File tree 1 file changed +4
-4
lines changed
src/librustc_data_structures
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -492,10 +492,10 @@ impl<T> Once<T> {
492
492
assert ! ( self . try_set( value) . is_none( ) ) ;
493
493
}
494
494
495
- /// Tries to initialize the inner value by calling the closure while ensuring that no-one else
496
- /// can access the value in the mean time by holding a lock for the duration of the closure.
497
- /// If the value was already initialized the closure is not called and `false` is returned,
498
- /// otherwise if the value from the closure initializes the inner value, `true` is returned
495
+ /// Initializes the inner value if it wasn't already done by calling the provided closure. It
496
+ /// ensures that no-one else can access the value in the mean time by holding a lock for the
497
+ /// duration of the closure.
498
+ /// A reference to the inner value is returned.
499
499
#[ inline]
500
500
pub fn init_locking < F : FnOnce ( ) -> T > ( & self , f : F ) -> & T {
501
501
{
You can’t perform that action at this time.
0 commit comments