diff options
| author | Teddy Wing | 2021-05-21 20:58:13 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-05-21 20:58:13 +0200 |
| commit | 580a7140ca263d4c8e4f53f52ab601ea51fb4af0 (patch) | |
| tree | 4732afa972d6c1961b91c5a59b6e49004054aab1 | |
| parent | 0c80fee74cd7600425dbdc6f261964b4ebcf2862 (diff) | |
| download | google-calendar-rsvp-580a7140ca263d4c8e4f53f52ab601ea51fb4af0.tar.bz2 | |
Move RSVP code into a separate function
So I can put command line argument parsing in `main()`.
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index c55eef8..55cc21b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,10 @@ use std::fs; #[tokio::main] async fn main() { + rsvp().await; +} + +async fn rsvp() { let secret = secret_from_file(); let auth = oauth2::InstalledFlowAuthenticator::builder( |
