Simplify method return type

This commit is contained in:
Hanno Braun 2022-03-16 14:32:56 +01:00
parent 31926784f3
commit 8954b5eb19

View File

@ -9,7 +9,7 @@ pub struct Model {
}
impl Model {
pub fn from_path(path: PathBuf) -> Result<Self, io::Error> {
pub fn from_path(path: PathBuf) -> io::Result<Self> {
let name = {
// Can't panic. It only would, if the path ends with "..", and we
// are canonicalizing it here to prevent that.