Skip to content

Commit 1fbc7c0

Browse files
authored
Migration: fix legacy deserialization (#2674)
1 parent 6ac4db3 commit 1fbc7c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/migration/src/email_v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ fn deserialize_keyword(bytes: &mut std::slice::Iter<'_, u8>) -> Option<LegacyKey
519519
FORWARDED => Some(LegacyKeyword::Forwarded),
520520
MDN_SENT => Some(LegacyKeyword::MdnSent),
521521
other => {
522-
let len = other - OTHER;
522+
let len = other - 12;
523523
let mut keyword = Vec::with_capacity(len);
524524
for _ in 0..len {
525525
keyword.push(*bytes.next()?);

crates/migration/src/object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl DeserializeFrom for Keyword {
327327
FORWARDED => Some(Keyword::Forwarded),
328328
MDN_SENT => Some(Keyword::MdnSent),
329329
other => {
330-
let len = other - OTHER;
330+
let len = other - 12;
331331
let mut keyword = Vec::with_capacity(len);
332332
for _ in 0..len {
333333
keyword.push(*bytes.next()?);

0 commit comments

Comments
 (0)