pub fn check_rename(new_key: &str, book: &Book) -> VResult<()> {
    if let Some(mut service) = load_service(book)? {
        if (*service).exists(new_key)? {
            return Err(Error::KeyAlreadyExists(new_key.to_owned()).into());
        }
    }
    Ok(())
}
/// Check if some other key on the same sync repository is free.
/// Checked before renaming vaults on remote.
/// Unsynchronized books always return Ok.
Check if some other key on the same sync repository is free.
Checked before renaming vaults on remote.
Unsynchronized books always return Ok.
Check if some other key on the same sync repository is free . Checked before renaming vaults on remote . Unsynchronized books always return Ok .
pub fn check_rename(new_key: &str, book: &Book) -> VResult<()> {
    if let Some(mut service) = load_service(book)? {
        if (*service).exists(new_key)? {
            return Err(Error::KeyAlreadyExists(new_key.to_owned()).into());
        }
    }
    Ok(())
}
pub fn check_rename ( new_key : & str , book : & Book ) -> VResult < ( ) > { if let Some ( mut service ) = load_service ( book ) ? { if ( * service ) . exists ( new_key ) ? { return Err ( Error :: KeyAlreadyExists ( new_key . to_owned ( ) ) . into ( ) ) ; } } Ok ( ( ) ) }
Check if some other key on the same sync repository is free.
Check if some other key on the same sync repository is free .
new_key
&str
book
&Book
new_key
&str
book
&Book