12 lines
237 B
Rust
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);
|
|
}
|