fn remove_inner(&self) -> Result<(), AccountManagerError> {
        match self.lifetime.as_ref() {
            AccountLifetime::Ephemeral => Ok(()),
            AccountLifetime::Persistent { account_dir } => {
                let token_db_path = &account_dir.join(TOKEN_DB);
                if token_db_path.exists() {
                    fs::remove_file(token_db_path).map_err(|err| {
                        warn!("Failed to delete token db: {:?}", err);
                        AccountManagerError::new(ApiError::Resource).with_cause(err)
                    })?;
                }
                let to_remove = StoredAccount::path(&account_dir.clone());
                fs::remove_file(to_remove).map_err(|err| {
                    warn!("Failed to delete account doc: {:?}", err);
                    AccountManagerError::new(ApiError::Resource).with_cause(err)
                })
            }
        }
    }
/// Removes the account from disk.
Removes the account from disk.
Removes the account from disk .
fn remove_inner(&self) -> Result<(), AccountManagerError> {
        match self.lifetime.as_ref() {
            AccountLifetime::Ephemeral => Ok(()),
            AccountLifetime::Persistent { account_dir } => {
                let token_db_path = &account_dir.join(TOKEN_DB);
                if token_db_path.exists() {
                    fs::remove_file(token_db_path).map_err(|err| {
                        warn!("Failed to delete token db: {:?}", err);
                        AccountManagerError::new(ApiError::Resource).with_cause(err)
                    })?;
                }
                let to_remove = StoredAccount::path(&account_dir.clone());
                fs::remove_file(to_remove).map_err(|err| {
                    warn!("Failed to delete account doc: {:?}", err);
                    AccountManagerError::new(ApiError::Resource).with_cause(err)
                })
            }
        }
    }
fn remove_inner ( & self ) -> Result < ( ) , AccountManagerError > { match self . lifetime . as_ref ( ) { AccountLifetime :: Ephemeral => Ok ( ( ) ) , AccountLifetime :: Persistent { account_dir } => { let token_db_path = & account_dir . join ( TOKEN_DB ) ; if token_db_path . exists ( ) { fs :: remove_file ( token_db_path ) . map_err ( | err | { warn ! ( " " err ) ; AccountManagerError :: new ( ApiError :: Resource ) . with_cause ( err ) } ) ? ; } let to_remove = StoredAccount :: path ( & account_dir . clone ( ) ) ; fs :: remove_file ( to_remove ) . map_err ( | err | { warn ! ( " " err ) ; AccountManagerError :: new ( ApiError :: Resource ) . with_cause ( err ) } ) } } }
Removes the account from disk.
Removes the account from disk .
&self
&self