/// finds the most recent log in the error report directory, unless `log` is Some, and will try to
/// read that file instead.
finds the most recent log in the error report directory, unless `log` is Some, and will try to
read that file instead.
finds the most recent log in the error report directory unless ` log ` is Some and will try to read that file instead .
pub fn read_log(log: Option<&Path>) -> Result<Report> {
    match log {
        Some(path) => {
            let r = BufReader::new(File::open(error_report_dir()?.join(path))?);
            serde_json::from_reader(r).map_err(|e| e.into())
        }
        None => latest_report(),
    }
}
pub fn read_log ( log : Option < & Path > ) -> Result < Report > { match log { Some ( path ) => { let r = BufReader :: new ( File :: open ( error_report_dir ( ) ? . join ( path ) ) ? ) ; serde_json :: from_reader ( r ) . map_err ( | e | e . into ( ) ) } None => latest_report ( ) , } }
finds the most recent log in the error report directory, unless `log` is Some, and will try to
read that file instead.
finds the most recent log in the error report directory unless ` log ` is Some and will try to read that file instead .
log
Option<&Path>