This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::sync::{RwLock, Arc}; | |
use std::option::Option; | |
#[derive(Debug)] | |
struct Tomato{ | |
salad: std::string::String, | |
} | |
fn main() { | |
let optional_rwlock: Arc<RwLock<Option<Tomato>>> = Arc::new(RwLock::new(None)); |