diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:30:40 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:30:40 +0100 |
commit | 2adf73dd8e6e76997d4fb67f9f7b3fe065530722 (patch) | |
tree | eb8e82dda00db9a99c4f509d572f4dbd2ae1d541 /src/imap/mime_view.rs | |
parent | 3f204b102abb408a9f0b2adc45065585ddc16a88 (diff) | |
download | aerogramme-2adf73dd8e6e76997d4fb67f9f7b3fe065530722.tar.gz aerogramme-2adf73dd8e6e76997d4fb67f9f7b3fe065530722.zip |
Update imap-flow, clean IDLE
Diffstat (limited to 'src/imap/mime_view.rs')
-rw-r--r-- | src/imap/mime_view.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imap/mime_view.rs b/src/imap/mime_view.rs index 8fc043b..8bbbd2d 100644 --- a/src/imap/mime_view.rs +++ b/src/imap/mime_view.rs @@ -8,7 +8,7 @@ use imap_codec::imap_types::body::{ BasicFields, Body as FetchBody, BodyStructure, MultiPartExtensionData, SinglePartExtensionData, SpecificFields, }; -use imap_codec::imap_types::core::{AString, IString, NString, NonEmptyVec}; +use imap_codec::imap_types::core::{AString, IString, NString, Vec1}; use imap_codec::imap_types::fetch::{Part as FetchPart, Section as FetchSection}; use eml_codec::{ @@ -141,8 +141,8 @@ impl<'a> NodeMime<'a> { enum SubsettedSection<'a> { Part, Header, - HeaderFields(&'a NonEmptyVec<AString<'a>>), - HeaderFieldsNot(&'a NonEmptyVec<AString<'a>>), + HeaderFields(&'a Vec1<AString<'a>>), + HeaderFieldsNot(&'a Vec1<AString<'a>>), Text, Mime, } @@ -238,7 +238,7 @@ impl<'a> SelectedMime<'a> { /// case-insensitive but otherwise exact. fn header_fields( &self, - fields: &'a NonEmptyVec<AString<'a>>, + fields: &'a Vec1<AString<'a>>, invert: bool, ) -> Result<ExtractedFull<'a>> { // Build a lowercase ascii hashset with the fields to fetch @@ -398,8 +398,8 @@ impl<'a> NodeMult<'a> { .filter_map(|inner| NodeMime(&inner).structure(is_ext).ok()) .collect::<Vec<_>>(); - NonEmptyVec::validate(&inner_bodies)?; - let bodies = NonEmptyVec::unvalidated(inner_bodies); + Vec1::validate(&inner_bodies)?; + let bodies = Vec1::unvalidated(inner_bodies); Ok(BodyStructure::Multi { bodies, |