diff options
| author | Teddy Wing | 2021-05-22 18:31:58 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-05-22 18:31:58 +0200 |
| commit | 14be8689987d367c6d5c4bd638cffc4d70468e54 (patch) | |
| tree | e35e309af8ea633f0e98dec01cbeee6549730e67 | |
| parent | ad06bc6172b2c9204629ccead723d86b388ff364 (diff) | |
| download | google-calendar-rsvp-14be8689987d367c6d5c4bd638cffc4d70468e54.tar.bz2 | |
Silence `email_eid` unused warning
Silence this warning:
warning: value assigned to `email_eid` is never read
--> src/main.rs:44:9
|
44 | let mut email_eid = String::new();
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_assignments)]` on by default
= help: maybe it is overwritten before being read?
warning: 1 warning emitted
We are reading the variable, but only if `should_read_email`.
| -rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index c71a44d..a01d6f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let mut action_opt: Option<EventResponseStatus> = None; let mut should_read_email = false; + + #[allow(unused_assignments)] let mut email_eid = String::new(); + let mut event_ids = Vec::new(); for arg in &args[1..] { |
