diff --git a/cpclib-disc/src/lib.rs b/cpclib-disc/src/lib.rs index 38846f7b..7b609be8 100644 --- a/cpclib-disc/src/lib.rs +++ b/cpclib-disc/src/lib.rs @@ -24,6 +24,9 @@ pub mod edsk; #[cfg(feature = "hfe")] pub mod hfe; +#[cfg(feature = "hfe")] +use crate::hfe::Hfe; + use std::io::Read; use std::path::Path; use std::str::FromStr; @@ -51,7 +54,7 @@ impl From for DskManagerError { #[cfg(feature = "hfe")] pub fn new_disc>(path: Option

) -> Hfe { - let disc = Hfe::default(); + Hfe::default() } #[cfg(not(feature = "hfe"))] @@ -70,10 +73,8 @@ pub fn open_disc>(path: P, fail_if_missing: bool) -> R } } - Hfe::open(disc_filename).map_err(|e| { - AssemblerError::AssemblingError { - msg: format!("Error while loading {e}") - } + Hfe::open(path).map_err(|e| { + format!("Error while loading {e}") }) }