From 0ed95f3546329693e4504e5337986add528a9f67 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 10 Mar 2025 22:36:26 +0000 Subject: [PATCH] fix: some smol fixes --- src/bin/update_groups.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/update_groups.rs b/src/bin/update_groups.rs index 2009998..050d367 100644 --- a/src/bin/update_groups.rs +++ b/src/bin/update_groups.rs @@ -12,7 +12,7 @@ async fn main() -> tide::Result<()> { } async fn update(config: &Config) -> tide::Result<()> { - let db = db_init(config).await.unwrap(); + let db = db_init(config).await?; // default user to ensure group is never empty let mut users_tmp = HashSet::from([String::from("compsoc")]); @@ -33,7 +33,7 @@ async fn update(config: &Config) -> tide::Result<()> { } // pull from wolves csv - for user in from_csv(&db).await.unwrap_or_default() { + for user in from_wolves(&db).await.unwrap_or_default() { users_tmp.insert(user); } @@ -73,7 +73,7 @@ fn get_from_env(users: &mut HashSet, other: &mut HashSet, key: & } } -async fn from_csv(db: &Pool) -> Result, Box> { +async fn from_wolves(db: &Pool) -> Result, Box> { let mut uids = HashSet::new(); for record in get_wolves(db).await {