Skip OK Completed line

This commit is contained in:
Jon Gjengset 2017-05-12 17:12:58 -04:00
parent 2d26841eb9
commit 2e45a178a1
No known key found for this signature in database
GPG Key ID: D64AC9D67176DC71

View File

@ -187,10 +187,13 @@ fn main() {
loop {
// check current state of inbox
let unseen = imap_socket
let mut unseen = imap_socket
.run_command_and_read_response("SEARCH UNSEEN")
.unwrap();
// remove last line of response (OK Completed)
unseen.pop();
let mut num_unseen = 0;
let mut uids = Vec::new();
let unseen = unseen.join(" ");