From 2ac58d716511f1b2acd9289bc8a951dc2b230b23 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 21 May 2021 23:26:45 +0200 Subject: Change spacing of command line argument parsing I like this better. More readable to have the variable assignments in the same column. --- src/main.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 84157fb..ba6b086 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,13 +29,18 @@ async fn main() -> Result<(), Box> { for arg in &args[1..] { match arg.as_ref() { - "-y" | "--yes" => action = Some(EventResponseStatus::Accepted), - "-n" | "--no" => action = Some(EventResponseStatus::Declined), - "-m" | "--maybe" => action = Some(EventResponseStatus::Tentative), - - "--email" => email = true, - - id => event_ids.push(id), + "-y" | "--yes" => + action = Some(EventResponseStatus::Accepted), + "-n" | "--no" => + action = Some(EventResponseStatus::Declined), + "-m" | "--maybe" => + action = Some(EventResponseStatus::Tentative), + + "--email" => + email = true, + + id => + event_ids.push(id), } } -- cgit v1.2.3