pub fn reload_state_from_fs(&mut self) -> io::Result<()> {
        let file = fs::File::open(self.file_manager.state_path()).map(|file| Some(file)).or_else(
            |err| match err.kind() {
                io::ErrorKind::NotFound => Ok(None),
                _ => Err(err),
            },
        )?;
        if let Some(file) = file {
            self.state = serde_json::from_reader(file)?;
        }
        Ok(())
    }
/// Reload cached workspace state from filesystem
Reload cached workspace state from filesystem
Reload cached workspace state from filesystem
pub fn reload_state_from_fs(&mut self) -> io::Result<()> {
        let file = fs::File::open(self.file_manager.state_path()).map(|file| Some(file)).or_else(
            |err| match err.kind() {
                io::ErrorKind::NotFound => Ok(None),
                _ => Err(err),
            },
        )?;
        if let Some(file) = file {
            self.state = serde_json::from_reader(file)?;
        }
        Ok(())
    }
pub fn reload_state_from_fs ( & mut self ) -> io :: Result < ( ) > { let file = fs :: File :: open ( self . file_manager . state_path ( ) ) . map ( | file | Some ( file ) ) . or_else ( | err | match err . kind ( ) { io :: ErrorKind :: NotFound => Ok ( None ) , _ => Err ( err ) , } , ) ? ; if let Some ( file ) = file { self . state = serde_json :: from_reader ( file ) ? ; } Ok ( ( ) ) }
Reload cached workspace state from filesystem
Reload cached workspace state from filesystem
&mut self
&mut self