rust@octodon.social ("Rust tips") wrote:
You can often use `Default::default()` to initialize complex #rustlang types, e.g. for a new `Arc<Mutex<Vec>>` instead of `Arc::new(Mutex::new(Vec::new()))` you can call `Arc::default()`.
rust@octodon.social ("Rust tips") wrote:
You can often use `Default::default()` to initialize complex #rustlang types, e.g. for a new `Arc<Mutex<Vec>>` instead of `Arc::new(Mutex::new(Vec::new()))` you can call `Arc::default()`.