diff --git a/src/advance/concurrency-with-threads/thread.md b/src/advance/concurrency-with-threads/thread.md index 7b9d37b6..b8c8910e 100644 --- a/src/advance/concurrency-with-threads/thread.md +++ b/src/advance/concurrency-with-threads/thread.md @@ -475,10 +475,10 @@ fn main() { ```rust use std::thread; -use std::sync::{Once, ONCE_INIT}; +use std::sync::Once; static mut VAL: usize = 0; -static INIT: Once = ONCE_INIT; +static INIT: Once = Once::new(); fn main() { let handle1 = thread::spawn(move || {