diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-07-30 20:09:47 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-07-30 20:09:50 +0200 |
commit | ae38752e503ce921bea34e72415be4b4aadcdf68 (patch) | |
tree | b7a1fcac8779e5757a10204407d28f5fa5f8754c | |
parent | 99968c72a5efbd535362e050baf314f9e0cff709 (diff) |
chore: log if the user has logged in
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 203dca2..270af8e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,8 +19,13 @@ async fn main() -> Result<(), Box<dyn Error>> { unsafe { browser::init(&config.driver_url).await; - if let Err(e) = browser::login(&config).await { - panic!("You can't connect: `{}`, credentials are {:?}", e, config); + match browser::login(&config).await { + Ok(_) => { + log::info!("Logged in Smartedu"); + } + Err(e) => { + panic!("You can't connect: `{}`, credentials are {:?}", e, config); + } } } |