Create a new `AbsolutePath`
(path: PathBuf)
| 47 | |
| 48 | impl AbsolutePath { |
| 49 | /// Create a new `AbsolutePath` |
| 50 | pub fn new(path: PathBuf) -> Result<AbsolutePath, Error> { |
| 51 | match path.is_absolute() { |
| 52 | true => Ok(AbsolutePath(path)), |
| 53 | false => Err(Error::PathNotAbsolute(path)), |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /// Return a reference to the inner type |
nothing calls this directly
no test coverage detected