Fixed deprecated code: `ONCE_INIT`->`Once::new()`

pull/735/head
Rustln 3 years ago committed by GitHub
parent a150dd9ca8
commit cb0fa880c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 || {

Loading…
Cancel
Save