Remove unwraps (#1153)

* Remove a batch of unwraps

* finish another batch
This commit is contained in:
Jonathan Turner
2020-01-04 10:11:21 +13:00
committed by GitHub
parent 339a2de0eb
commit 5919c6c433
27 changed files with 449 additions and 220 deletions

View File

@ -30,7 +30,11 @@ impl AbsoluteFile {
}
pub fn dir(&self) -> AbsolutePath {
AbsolutePath::new(self.inner.parent().unwrap())
AbsolutePath::new(if let Some(parent) = self.inner.parent() {
parent
} else {
unreachable!("Internal error: could not get parent in dir")
})
}
}