From 2adf73dd8e6e76997d4fb67f9f7b3fe065530722 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 22 Feb 2024 17:30:40 +0100 Subject: Update imap-flow, clean IDLE --- src/imap/mime_view.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/imap/mime_view.rs') 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>), - HeaderFieldsNot(&'a NonEmptyVec>), + HeaderFields(&'a Vec1>), + HeaderFieldsNot(&'a Vec1>), Text, Mime, } @@ -238,7 +238,7 @@ impl<'a> SelectedMime<'a> { /// case-insensitive but otherwise exact. fn header_fields( &self, - fields: &'a NonEmptyVec>, + fields: &'a Vec1>, invert: bool, ) -> Result> { // 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::>(); - NonEmptyVec::validate(&inner_bodies)?; - let bodies = NonEmptyVec::unvalidated(inner_bodies); + Vec1::validate(&inner_bodies)?; + let bodies = Vec1::unvalidated(inner_bodies); Ok(BodyStructure::Multi { bodies, -- cgit v1.2.3