mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-28 08:01:24 +00:00
Update multi_byte.rs (#86)
Under some extreme circumstances, the pre-allocated length might not be sufficient.
This commit is contained in:
@@ -14,7 +14,7 @@ use encoding_rs::*;
|
||||
|
||||
#[cfg(feature = "full_encoding")]
|
||||
fn multi_byte_decoder(mut decoder: Decoder, bytes: &[u8]) -> String {
|
||||
let mut result = String::with_capacity(bytes.len() * 3);
|
||||
let mut result = String::with_capacity(bytes.len() * 4);
|
||||
|
||||
if let (CoderResult::OutputFull, _, _) = decoder.decode_to_string(bytes, &mut result, true) {
|
||||
debug_assert!(false, "String full while decoding.")
|
||||
|
||||
Reference in New Issue
Block a user