diff --git a/src/bitreader.rs b/src/bitreader.rs index 2789d0d..0410de1 100644 --- a/src/bitreader.rs +++ b/src/bitreader.rs @@ -45,7 +45,7 @@ pub struct BitReader<'a> { impl BitReader<'_> { #[inline] - pub const fn new(data: &[u8], bit_pos: usize) -> BitReader { + pub const fn new(data: &[u8], bit_pos: usize) -> BitReader<'_> { BitReader { data, bit_pos } } diff --git a/src/crunch/crn_decomp.rs b/src/crunch/crn_decomp.rs index ed5649a..ea9d90f 100644 --- a/src/crunch/crn_decomp.rs +++ b/src/crunch/crn_decomp.rs @@ -188,7 +188,7 @@ impl CrnHeader { // } // } -pub fn crnd_unpack_begin(p_data: &[u8], data_size: u32) -> Result { +pub fn crnd_unpack_begin(p_data: &[u8], data_size: u32) -> Result, &'static str> { if data_size < CRNHEADER_MIN_SIZE as u32 { return Err("Data size is below the minimum allowed."); } diff --git a/src/unitycrunch/crn_decomp.rs b/src/unitycrunch/crn_decomp.rs index 90a2e15..8e81c13 100644 --- a/src/unitycrunch/crn_decomp.rs +++ b/src/unitycrunch/crn_decomp.rs @@ -3,7 +3,7 @@ use crate::crnlib::CrnFormat; use crate::crunch::crn_consts::*; extern crate alloc; -pub fn crnd_unpack_begin(p_data: &[u8], data_size: u32) -> Result { +pub fn crnd_unpack_begin(p_data: &[u8], data_size: u32) -> Result, &'static str> { if data_size < CRNHEADER_MIN_SIZE as u32 { return Err("Data size is below the minimum allowed."); }