From 2ad0ec13c4d1f9c1fd01c1de9b3010a98947b053 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 18 Sep 2018 11:14:31 -0400 Subject: [PATCH] rustfmt --- src/main.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index cafcee7..484e1f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,7 +97,8 @@ impl Connection { loop { // check current state of inbox - let mut unseen = self.socket + let mut unseen = self + .socket .run_command_and_read_response("UID SEARCH UNSEEN 1:*")?; // remove last line of response (OK Completed) @@ -119,7 +120,8 @@ impl Connection { let mut subjects = Vec::new(); if !uids.is_empty() { - for msg in self.socket + for msg in self + .socket .uid_fetch(&uids.join(","), "RFC822.HEADER")? .iter() { @@ -215,7 +217,8 @@ fn main() { // Figure out what accounts we have to deal with let accounts: Vec<_> = match config.as_table() { - Some(t) => t.iter() + Some(t) => t + .iter() .filter_map(|(name, v)| match v.as_table() { None => { println!("Configuration for account {} is broken: not a table", name); @@ -245,8 +248,7 @@ fn main() { password: password, }) } - }) - .collect(), + }).collect(), None => { println!("Could not parse configuration file buzz.toml: not a table"); return; @@ -304,8 +306,7 @@ fn main() { } None - }) - .collect(); + }).collect(); if accounts.is_empty() { println!("No accounts in config worked; exiting..."); @@ -328,8 +329,9 @@ fn main() { for (i, num_unseen) in rx { unseen[i] = num_unseen; if unseen.iter().sum::() == 0 { - app.set_icon_from_file(&"/usr/share/icons/oxygen/base/32x32/status/mail-unread.png".to_string()) - .unwrap(); + app.set_icon_from_file( + &"/usr/share/icons/oxygen/base/32x32/status/mail-unread.png".to_string(), + ).unwrap(); } else { app.set_icon_from_file( &"/usr/share/icons/oxygen/base/32x32/status/mail-unread-new.png".to_string(),