Skip to content

Commit a01dff6

Browse files
authored
Merge pull request #39 from async-email/imap-proto-011
Update imap-proto to 0.11
2 parents 95340d8 + 78fb381 commit a01dff6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ is-it-maintained-open-issues = { repository = "async-email/async-imap" }
2222
default = []
2323

2424
[dependencies]
25-
imap-proto = "0.10"
25+
imap-proto = "0.11"
2626
nom = "5.0"
2727
base64 = "0.12"
2828
chrono = "0.4"

src/imap_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<R: Read + Write + Unpin> ImapStream<R> {
111111
let res = ResponseData::try_new(block, |buf| {
112112
let buf = &buf[..self.buffer.used()];
113113
log::trace!("decode: input: {:?}", std::str::from_utf8(buf));
114-
match imap_proto::parse_response(buf) {
114+
match imap_proto::parser::parse_response(buf) {
115115
Ok((remaining, response)) => {
116116
// TODO: figure out if we can use a minimum required size for a response.
117117
self.decode_needs = None;

src/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ pub(crate) async fn parse_mailbox<T: Stream<Item = io::Result<ResponseData>> + U
239239
MailboxDatum::List { .. } => {}
240240
MailboxDatum::MetadataSolicited { .. } => {}
241241
MailboxDatum::MetadataUnsolicited { .. } => {}
242+
MailboxDatum::Search { .. } => {}
242243
},
243244
_ => {
244245
handle_unilateral(resp, unsolicited.clone()).await;
@@ -263,7 +264,7 @@ pub(crate) async fn parse_ids<T: Stream<Item = io::Result<ResponseData>> + Unpin
263264
{
264265
let resp = resp?;
265266
match resp.parsed() {
266-
Response::IDs(cs) => {
267+
Response::MailboxData(MailboxDatum::Search(cs)) => {
267268
for c in cs {
268269
ids.insert(*c);
269270
}
@@ -333,7 +334,7 @@ mod tests {
333334
let mut block = crate::imap_stream::POOL.alloc(line.as_bytes().len());
334335
block.copy_from_slice(line.as_bytes());
335336
ResponseData::try_new(block, |bytes| -> io::Result<_> {
336-
let (remaining, response) = imap_proto::parse_response(bytes).unwrap();
337+
let (remaining, response) = imap_proto::parser::parse_response(bytes).unwrap();
337338
assert_eq!(remaining.len(), 0);
338339
Ok(response)
339340
})

0 commit comments

Comments
 (0)