mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-29 00:01:49 +00:00
DecoderFnc less restrictive lifetime.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user