pub fn reload_bars(&self) {
        info!("Reloading bar listing");
        match File::open(BARS_FILE_PATH) {
            Ok(mut file) => match serde_json::from_reader(&mut file) {
                Ok(bars) => {
                    let mut listing = self.bars.write().unwrap();
                    *listing = bars;
                    info!("Successfully reloaded bar listing");
                }
                Err(err) => error!(
                    "Couldn't parse bar liting file {} {:?}",
                    BARS_FILE_PATH, err
                ),
            },
            Err(err) => error!(
                "Couldn't open bar listing file {} {:?}",
                BARS_FILE_PATH, err
            ),
        }
    }
/// Attempt to reload the directory of bars from disk.
///
/// This can fail for various IO related reasons, including if the bar directory file is not
/// present or is corrupt. In these cases, nothing is changed and we continue using the
/// previously loaded listing.
Attempt to reload the directory of bars from disk.
This can fail for various IO related reasons, including if the bar directory file is not
present or is corrupt. In these cases, nothing is changed and we continue using the
previously loaded listing.
Attempt to reload the directory of bars from disk . This can fail for various IO related reasons including if the bar directory file is not present or is corrupt . In these cases nothing is changed and we continue using the previously loaded listing .
pub fn reload_bars(&self) {
        info!("Reloading bar listing");
        match File::open(BARS_FILE_PATH) {
            Ok(mut file) => match serde_json::from_reader(&mut file) {
                Ok(bars) => {
                    let mut listing = self.bars.write().unwrap();
                    *listing = bars;
                    info!("Successfully reloaded bar listing");
                }
                Err(err) => error!(
                    "Couldn't parse bar liting file {} {:?}",
                    BARS_FILE_PATH, err
                ),
            },
            Err(err) => error!(
                "Couldn't open bar listing file {} {:?}",
                BARS_FILE_PATH, err
            ),
        }
    }
pub fn reload_bars ( & self ) { info ! ( " " ) ; match File :: open ( BARS_FILE_PATH ) { Ok ( mut file ) => match serde_json :: from_reader ( & mut file ) { Ok ( bars ) => { let mut listing = self . bars . write ( ) . unwrap ( ) ; * listing = bars ; info ! ( " " ) ; } Err ( err ) => error ! ( " " BARS_FILE_PATH err ) , } , Err ( err ) => error ! ( " " BARS_FILE_PATH err ) , } }
Attempt to reload the directory of bars from disk.
Attempt to reload the directory of bars from disk .
&self
&self