diff options
| author | bors <bors@rust-lang.org> | 2020-09-01 05:41:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-01 05:41:22 +0000 |
| commit | d9cd4a33f53689bc0847775669a14f666a138fd7 (patch) | |
| tree | 24ce504a4585e8a47614d43144214a4fc326b028 /library/std/src/lazy.rs | |
| parent | 445f34bb144c5b163163d8243e9845c644d3662d (diff) | |
| parent | 943911cc8bc173763a76fcc20dc4d75274e0cd9b (diff) | |
| download | rust-d9cd4a33f53689bc0847775669a14f666a138fd7.tar.gz rust-d9cd4a33f53689bc0847775669a14f666a138fd7.zip | |
Auto merge of #76047 - Dylan-DPC:rename/maybe, r=RalfJung
rename get_{ref, mut} to assume_init_{ref,mut} in Maybeuninit
References #63568
Rework with comments addressed from #66174
Have replaced most of the occurrences I've found, hopefully didn't miss out anything
r? @RalfJung
(thanks @danielhenrymantilla for the initial work on this)
Diffstat (limited to 'library/std/src/lazy.rs')
| -rw-r--r-- | library/std/src/lazy.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs index 1129f29e949..845e9d76a77 100644 --- a/library/std/src/lazy.rs +++ b/library/std/src/lazy.rs @@ -379,13 +379,13 @@ impl<T> SyncOnceCell<T> { /// Safety: The value must be initialized unsafe fn get_unchecked(&self) -> &T { debug_assert!(self.is_initialized()); - (&*self.value.get()).get_ref() + (&*self.value.get()).assume_init_ref() } /// Safety: The value must be initialized unsafe fn get_unchecked_mut(&mut self) -> &mut T { debug_assert!(self.is_initialized()); - (&mut *self.value.get()).get_mut() + (&mut *self.value.get()).assume_init_mut() } } |
