pub fn load() -> Tips {
        let contents = crate::helpers::read_to_string(&CONFIG.db_file);
        let tips: Tips = match serde_yaml::from_str(&contents) {
            Ok(tips) => tips,
            Err(error) => {
                panic!("Error deserialize tips {}\n{}",
                       &contents, error)
            },
        };

        tips
    }
// Load the current DB into a Tips struct, and then returns it to caller
Load the current DB into a Tips struct, and then returns it to caller
Load the current DB into a Tips struct and then returns it to caller
pub fn load() -> Tips {
        let contents = crate::helpers::read_to_string(&CONFIG.db_file);
        let tips: Tips = match serde_yaml::from_str(&contents) {
            Ok(tips) => tips,
            Err(error) => {
                panic!("Error deserialize tips {}\n{}",
                       &contents, error)
            },
        };
        tips
    }
pub fn load ( ) -> Tips { let contents = crate :: helpers :: read_to_string ( & CONFIG . db_file ) ; let tips : Tips = match serde_yaml :: from_str ( & contents ) { Ok ( tips ) => tips , Err ( error ) => { panic ! ( " \n " contents error ) } , } ; tips }
Load the current DB into a Tips struct, and then returns it to caller
Load the current DB into a Tips struct and then returns it to caller