Skip to content

Update imap-proto to 0.11 #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ is-it-maintained-open-issues = { repository = "async-email/async-imap" }
default = []

[dependencies]
imap-proto = "0.10"
imap-proto = "0.11"
nom = "5.0"
base64 = "0.12"
chrono = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/imap_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl<R: Read + Write + Unpin> ImapStream<R> {
let res = ResponseData::try_new(block, |buf| {
let buf = &buf[..self.buffer.used()];
log::trace!("decode: input: {:?}", std::str::from_utf8(buf));
match imap_proto::parse_response(buf) {
match imap_proto::parser::parse_response(buf) {
Ok((remaining, response)) => {
// TODO: figure out if we can use a minimum required size for a response.
self.decode_needs = None;
Expand Down
5 changes: 3 additions & 2 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ pub(crate) async fn parse_mailbox<T: Stream<Item = io::Result<ResponseData>> + U
MailboxDatum::List { .. } => {}
MailboxDatum::MetadataSolicited { .. } => {}
MailboxDatum::MetadataUnsolicited { .. } => {}
MailboxDatum::Search { .. } => {}
},
_ => {
handle_unilateral(resp, unsolicited.clone()).await;
Expand All @@ -263,7 +264,7 @@ pub(crate) async fn parse_ids<T: Stream<Item = io::Result<ResponseData>> + Unpin
{
let resp = resp?;
match resp.parsed() {
Response::IDs(cs) => {
Response::MailboxData(MailboxDatum::Search(cs)) => {
for c in cs {
ids.insert(*c);
}
Expand Down Expand Up @@ -333,7 +334,7 @@ mod tests {
let mut block = crate::imap_stream::POOL.alloc(line.as_bytes().len());
block.copy_from_slice(line.as_bytes());
ResponseData::try_new(block, |bytes| -> io::Result<_> {
let (remaining, response) = imap_proto::parse_response(bytes).unwrap();
let (remaining, response) = imap_proto::parser::parse_response(bytes).unwrap();
assert_eq!(remaining.len(), 0);
Ok(response)
})
Expand Down