summaryrefslogtreecommitdiff
path: root/src/browser/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/browser/mod.rs')
-rw-r--r--src/browser/mod.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/browser/mod.rs b/src/browser/mod.rs
index 2765c6d..d5ec337 100644
--- a/src/browser/mod.rs
+++ b/src/browser/mod.rs
@@ -22,15 +22,10 @@ pub async unsafe fn login(credentials: &Config) -> WebDriverResult<()> {
pub async unsafe fn get_faculties() -> WebDriverResult<Option<HashMap<String, String>>> {
if let Some(driver) = &WEB_BROWSER {
- match driver.faculties().await? {
- Some(faculties) => {
- return Ok(Some(faculties));
- }
- None => {
- return Ok(Some(HashMap::<String, String>::new()));
- }
- };
+ if let Some(faculties) = driver.faculties().await? {
+ return Ok(Some(faculties));
+ }
}
- Ok(Some(HashMap::<String, String>::new()))
+ Ok(None)
}