From e3123476f52cf9df9b8c7911204cd4090a43f466 Mon Sep 17 00:00:00 2001 From: Bryce Fisher-Fleig Date: Tue, 17 Sep 2019 20:14:29 -0700 Subject: [PATCH] (nit) Cargo fmt --- examples/rustls.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/examples/rustls.rs b/examples/rustls.rs index 0d8b803..bfc621e 100644 --- a/examples/rustls.rs +++ b/examples/rustls.rs @@ -1,16 +1,11 @@ extern crate imap; extern crate rustls_connector; -use std::{ - env, - error::Error, - net::TcpStream, -}; +use std::{env, error::Error, net::TcpStream}; use dotenv::dotenv; use rustls_connector::RustlsConnector; - fn main() -> Result<(), Box> { // Read config from environment or .env file dotenv().ok(); @@ -26,7 +21,12 @@ fn main() -> Result<(), Box> { Ok(()) } -fn fetch_inbox_top(host: String, user: String, password: String, port: u16) -> Result, Box> { +fn fetch_inbox_top( + host: String, + user: String, + password: String, + port: u16, +) -> Result, Box> { // Setup Rustls TcpStream let stream = TcpStream::connect((host.as_ref(), port))?; let tls = RustlsConnector::default(); @@ -38,9 +38,7 @@ fn fetch_inbox_top(host: String, user: String, password: String, port: u16) -> R // the client we have here is unauthenticated. // to do anything useful with the e-mails, we need to log in - let mut imap_session = client - .login(&user, &password) - .map_err(|e| e.0)?; + let mut imap_session = client.login(&user, &password).map_err(|e| e.0)?; // we want to fetch the first email in the INBOX mailbox imap_session.select("INBOX")?;