DecoderFnc less restrictive lifetime.

This commit is contained in:
Mauro D
2022-06-30 06:42:09 +00:00
parent e604f8fcec
commit c391056b92
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ use super::{
DecoderFnc,
};
pub fn get_charset_decoder<'x>(charset: &[u8]) -> Option<DecoderFnc<'x>> {
pub fn get_charset_decoder(charset: &[u8]) -> Option<DecoderFnc> {
if (2..=45).contains(&charset.len()) {
let mut l_charset = [0u8; 45];
let mut hash: u32 = charset.len() as u32;
+1 -1
View File
@@ -14,7 +14,7 @@ pub mod multi_byte;
pub mod single_byte;
pub mod utf;
pub type DecoderFnc<'x> = fn(&'x [u8]) -> String;
pub type DecoderFnc = fn(&[u8]) -> String;
#[cfg(test)]
mod tests {