i have a struct that looks like this
pub struct Dog {
names: HashSet<String>,
}
impl Dog {
pub async fn new() -> Self {
let set = Arc::new(Mutex::new(HashSet::new()));
// do some async ops
// wait for async ops to finish
Self {
// How can i convert the local set variable to HashSet?
names: ..
}
}
}