Skip to content

Instantly share code, notes, and snippets.

View Archina's full-sized avatar

Archina Archina

View GitHub Profile
@rust-play
rust-play / playground.rs
Created June 19, 2018 06:43
Code shared from the Rust Playground
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));