diff options
| author | Teddy Wing | 2021-05-21 23:26:45 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-05-21 23:26:45 +0200 | 
| commit | 2ac58d716511f1b2acd9289bc8a951dc2b230b23 (patch) | |
| tree | e7fcadd980feb1fa844fb92b2a00609cdcf4ca12 /src | |
| parent | d446feb636e40d6c9ee335051c936afede10cfc8 (diff) | |
| download | google-calendar-rsvp-2ac58d716511f1b2acd9289bc8a951dc2b230b23.tar.bz2 | |
Change spacing of command line argument parsing
I like this better. More readable to have the variable assignments in
the same column.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 19 | 
1 files changed, 12 insertions, 7 deletions
| 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<dyn std::error::Error>> {      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),          }      } | 
