pub fn clear_update_state(&mut self) -> io::Result<()> {
        self.file_manager.clear_download_dir()?;
        self.file_manager.clear_tmp_dir()?;
        match self.state_mut() {
            metadata::v1::State::New
            | metadata::v1::State::Stable { .. }
            | metadata::v1::State::Corrupted { .. } => {}
            metadata::v1::State::Updating(state) => {
                state.clear_progress();
                self.write_state()?;
            }
        }
        Ok(())
    }
/// Clear update temporary files and reset update progress
Clear update temporary files and reset update progress
Clear update temporary files and reset update progress
pub fn clear_update_state(&mut self) -> io::Result<()> {
        self.file_manager.clear_download_dir()?;
        self.file_manager.clear_tmp_dir()?;
        match self.state_mut() {
            metadata::v1::State::New
            | metadata::v1::State::Stable { .. }
            | metadata::v1::State::Corrupted { .. } => {}
            metadata::v1::State::Updating(state) => {
                state.clear_progress();
                self.write_state()?;
            }
        }
        Ok(())
    }
pub fn clear_update_state ( & mut self ) -> io :: Result < ( ) > { self . file_manager . clear_download_dir ( ) ? ; self . file_manager . clear_tmp_dir ( ) ? ; match self . state_mut ( ) { metadata :: v1 :: State :: New | metadata :: v1 :: State :: Stable { .. } | metadata :: v1 :: State :: Corrupted { .. } => { } metadata :: v1 :: State :: Updating ( state ) => { state . clear_progress ( ) ; self . write_state ( ) ? ; } } Ok ( ( ) ) }
Clear update temporary files and reset update progress
Clear update temporary files and reset update progress
&mut self
&mut self