aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-05-21 23:26:45 +0200
committerTeddy Wing2021-05-21 23:26:45 +0200
commit2ac58d716511f1b2acd9289bc8a951dc2b230b23 (patch)
treee7fcadd980feb1fa844fb92b2a00609cdcf4ca12
parentd446feb636e40d6c9ee335051c936afede10cfc8 (diff)
downloadgoogle-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.
-rw-r--r--src/main.rs19
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),
}
}