// Before calling this function, use lock to avoid data race;
Before calling this function, use lock to avoid data race.
Before calling this function use lock to avoid data race .
fn del_file_for_user(file_id: &str, user_id: &str) -> Result<()> {
    let uid = user_id.to_owned();
    let id_set = USER_FILE_STORE.get(&uid)?;
    if let Some(mut set) = id_set {
        set.remove(&file_id.to_owned());
        USER_FILE_STORE.set(&uid, &set)?;
    }
    Ok(())
}
fn del_file_for_user ( file_id : & str , user_id : & str ) -> Result < ( ) > { let uid = user_id . to_owned ( ) ; let id_set = USER_FILE_STORE . get ( & uid ) ? ; if let Some ( mut set ) = id_set { set . remove ( & file_id . to_owned ( ) ) ; USER_FILE_STORE . set ( & uid , & set ) ? ; } Ok ( ( ) ) }
Before calling this function, use lock to avoid data race;
Before calling this function use lock to avoid data race ;
file_id
&str
user_id
&str