mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:25:15 +02:00
Remove unwraps (#1153)
* Remove a batch of unwraps * finish another batch
This commit is contained in:
@ -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")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user