Files
simple-rust-tests/__concurrent/arc-swap/src/main.rs

12 lines
237 B
Rust

use once_cell::sync::Lazy;
use arc_swap::ArcSwap;
static TEST_STRING: Lazy<ArcSwap<String>> = Lazy::new(|| {
ArcSwap::from_pointee("Hello World!".to_owned())
});
fn main() {
let s = TEST_STRING.load();
println!("{}", s);
}