File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,20 @@ use core::{
24
24
// }
25
25
// the effects of c() or writes to shared memory will not necessarily be
26
26
// observed and additional synchronization methods may be needed.
27
- pub ( crate ) struct LazyUsize ( AtomicUsize ) ;
27
+ struct LazyUsize ( AtomicUsize ) ;
28
28
29
29
impl LazyUsize {
30
30
// The initialization is not completed.
31
31
const UNINIT : usize = usize:: MAX ;
32
32
33
- pub const fn new ( ) -> Self {
33
+ const fn new ( ) -> Self {
34
34
Self ( AtomicUsize :: new ( Self :: UNINIT ) )
35
35
}
36
36
37
37
// Runs the init() function at most once, returning the value of some run of
38
38
// init(). Multiple callers can run their init() functions in parallel.
39
39
// init() should always return the same value, if it succeeds.
40
- pub fn unsync_init ( & self , init : impl FnOnce ( ) -> usize ) -> usize {
40
+ fn unsync_init ( & self , init : impl FnOnce ( ) -> usize ) -> usize {
41
41
#[ cold]
42
42
fn do_init ( this : & LazyUsize , init : impl FnOnce ( ) -> usize ) -> usize {
43
43
let val = init ( ) ;
You can’t perform that action at this time.
0 commit comments