lint
This commit is contained in:
parent
11a656d7c5
commit
5e9f05c4b9
@ -66,11 +66,7 @@ async fn get(path: PathBuf) -> Result<Box<dyn Reader>, AssetReaderError> {
|
|||||||
|
|
||||||
let str_path = path.to_str().ok_or_else(|| {
|
let str_path = path.to_str().ok_or_else(|| {
|
||||||
AssetReaderError::Io(
|
AssetReaderError::Io(
|
||||||
io::Error::new(
|
io::Error::other(std::format!("non-utf8 path: {}", path.display())).into(),
|
||||||
io::ErrorKind::Other,
|
|
||||||
std::format!("non-utf8 path: {}", path.display()),
|
|
||||||
)
|
|
||||||
.into(),
|
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
@ -104,14 +100,11 @@ async fn get(path: PathBuf) -> Result<Box<dyn Reader>, AssetReaderError> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => Err(AssetReaderError::Io(
|
Err(err) => Err(AssetReaderError::Io(
|
||||||
io::Error::new(
|
io::Error::other(std::format!(
|
||||||
io::ErrorKind::Other,
|
"unexpected error while loading asset {}: {}",
|
||||||
std::format!(
|
path.display(),
|
||||||
"unexpected error while loading asset {}: {}",
|
err
|
||||||
path.display(),
|
))
|
||||||
err
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.into(),
|
.into(),
|
||||||
)),
|
)),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user