diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 2ba6bfb..f9e8200 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -38,10 +38,6 @@ pub enum Crunch64Error { NullPointer, #[error("Invalid compression level")] InvalidCompressionLevel, - #[cfg(not(feature = "c_bindings"))] - #[error("Failed to handle vpk0 data: {0}")] - Vpk0(String), - #[cfg(feature = "c_bindings")] #[error("Failed to handle vpk0 data")] Vpk0, } diff --git a/lib/src/vpk0.rs b/lib/src/vpk0.rs index e051768..db2f3ae 100644 --- a/lib/src/vpk0.rs +++ b/lib/src/vpk0.rs @@ -3,13 +3,13 @@ use crate::Crunch64Error; pub fn compress(bytes: &[u8]) -> Result, Crunch64Error> { match vpk0::encode_bytes(bytes) { Ok(bytes) => Ok(bytes.into_boxed_slice()), - Err(e) => Err(Crunch64Error::Vpk0(e.to_string())), + Err(_) => Err(Crunch64Error::Vpk0), } } pub fn decompress(bytes: &[u8]) -> Result, Crunch64Error> { match vpk0::decode_bytes(bytes) { Ok(bytes) => Ok(bytes.into_boxed_slice()), - Err(e) => Err(Crunch64Error::Vpk0(e.to_string())), + Err(_) => Err(Crunch64Error::Vpk0), } }