diff --git a/crates/fj-export/src/lib.rs b/crates/fj-export/src/lib.rs index 599d84089..038e8912d 100644 --- a/crates/fj-export/src/lib.rs +++ b/crates/fj-export/src/lib.rs @@ -36,7 +36,7 @@ pub fn export(mesh: &Mesh>, path: &Path) -> Result<(), Error> { export_stl(mesh, path) } Some(extension) => Err(Error::InvalidExtension( - extension.to_str().map(|s| s.to_string()), + extension.to_string_lossy().into_owned(), )), None => Err(Error::NoExtension), } @@ -119,9 +119,9 @@ pub enum Error { #[error("no extension specified")] NoExtension, - /// Unrecognised extension found `{0:?}` + /// Unrecognised extension found #[error("unrecognised extension found `{0:?}`")] - InvalidExtension(Option), + InvalidExtension(String), /// I/O error whilst exporting to file #[error("I/O error whilst exporting to file")]