/// Canonicalize a path as well as verify that it exists.
Canonicalize a path as well as verify that it exists.
Canonicalize a path as well as verify that it exists .
fn file<P: AsRef<Path>>(path: P) -> PathBuf {
    let path = path.as_ref();
    if !path.exists() || !path.is_file() {
        panic!("Unable to find file: {}", path.display())
    }
    path.canonicalize()
        .expect("to be able to canonicalize the path")
}
fn file < P : AsRef < Path > > ( path : P ) -> PathBuf { let path = path . as_ref ( ) ; if ! path . exists ( ) || ! path . is_file ( ) { panic ! ( " " path display ( ) ) } path . canonicalize ( ) . expect ( " " ) }
Canonicalize a path as well as verify that it exists.
Canonicalize a path as well as verify that it exists .
path
P