Medium
Assigning to a field through an Arc<T> handle
What happens when this program is compiled?
main.rs
use std::sync::Arc;
struct Counter {
value: i32,
}
fn main() {
let counter = Arc::new(Counter { value: 0 });
let counter2 = Arc::clone(&counter);
counter2.value += 1;
println!("{}", counter.value);
}24 of 53 in Rust