Fixing formatting for gmail_oauth2 example

This commit is contained in:
Matt McCoy 2016-06-29 19:38:55 -04:00
parent 75c4268e4e
commit ed03acf07d

View file

@ -29,20 +29,18 @@ fn main() {
imap_socket.authenticate("XOAUTH2", gmail_auth).unwrap(); imap_socket.authenticate("XOAUTH2", gmail_auth).unwrap();
match imap_socket.select("INBOX") { match imap_socket.select("INBOX") {
Ok(mailbox) => { Ok(mailbox) => println!("{}", mailbox),
println!("{}", mailbox); Err(e) => println!("Error selecting INBOX: {}", e)
}, };
Err(e) => println!("Error selecting INBOX: {}", e)
};
match imap_socket.fetch("2", "body[text]") { match imap_socket.fetch("2", "body[text]") {
Ok(lines) => { Ok(lines) => {
for line in lines.iter() { for line in lines.iter() {
print!("{}", line); print!("{}", line);
} }
}, },
Err(e) => println!("Error Fetching email 2: {}", e) Err(e) => println!("Error Fetching email 2: {}", e)
}; };
imap_socket.logout().unwrap(); imap_socket.logout().unwrap();
} }