Merge pull request #735 from Rustln/main

Fixed deprecated code: `ONCE_INIT`->`Once::new()`
pull/737/head
Sunface 3 years ago committed by GitHub
commit 4d1ea767f7
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