simple-path 0.4.2

Simplify Windows UNC path for `fs::canonicalize`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::io;

pub(crate) trait ErrorExt {
    fn into_io_error(self) -> io::Error;
}

impl ErrorExt for anyhow::Error {
    fn into_io_error(self) -> io::Error {
        match self.downcast::<io::Error>() {
            Ok(io_error) => io_error,
            Err(other_error) => io::Error::other(other_error),
        }
    }
}