pub fn allocate_name(&self) -> String {
        let mut names = self.names.lock().expect("names poisoned");
        loop {
            let name = generate_db_name();
            if !names.insert(name.clone()) {
                continue;
            }

            return name;
        }
    }
// todo: have a drop guard for this? (trying to prevent leaks)
have a drop guard for this. (trying to prevent leaks)
have a drop guard for this . ( trying to prevent leaks )
pub fn allocate_name(&self) -> String {
        let mut names = self.names.lock().expect("names poisoned");
        loop {
            let name = generate_db_name();
            if !names.insert(name.clone()) {
                continue;
            }
            return name;
        }
    }
pub fn allocate_name ( & self ) -> String { let mut names = self . names . lock ( ) . expect ( " " ) ; loop { let name = generate_db_name ( ) ; if ! names . insert ( name . clone ( ) ) { continue ; } return name ; } }
todo: have a drop guard for this?
todo : have a drop guard for this?
&self
&self