fix : clippy #48

Merged
esy merged 2 commits from main into main 2024-02-18 01:46:12 +00:00
3 changed files with 3 additions and 3 deletions

View file

@ -283,7 +283,7 @@ pub fn uid_to_dn(uid: &str) -> String {
format!("uid={},ou=users,dc=skynet,dc=ie", uid) format!("uid={},ou=users,dc=skynet,dc=ie", uid)
} }
pub async fn update_group(config: &Config, group: &str, users: &Vec<String>, replace: bool) -> tide::Result<()> { pub async fn update_group(config: &Config, group: &str, users: &[String], replace: bool) -> tide::Result<()> {
if users.is_empty() { if users.is_empty() {
return Ok(()); return Ok(());
} }

View file

@ -421,7 +421,7 @@ pub mod account {
ldap.extended(tmp).unwrap(); ldap.extended(tmp).unwrap();
// user is already verified by being an active member on wolves // user is already verified by being an active member on wolves
if let Err(e) = update_group(config, "skynet-users", &vec![username.to_string()], false).await { if let Err(e) = update_group(config, "skynet-users", &[username.to_string()], false).await {
println!("Couldnt add {} to skynet-users: {:?}", username, e) println!("Couldnt add {} to skynet-users: {:?}", username, e)
} }

View file

@ -87,7 +87,7 @@ async fn activate_group(db: &Pool<Sqlite>, config: &Config, user: &str, mail: &s
// check if user has this mail in teh wolves db // check if user has this mail in teh wolves db
if !get_wolves_mail(db, mail).await.is_empty() { if !get_wolves_mail(db, mail).await.is_empty() {
// if so then activate // if so then activate
if let Err(e) = update_group(config, "skynet-users", &vec![user.to_string()], false).await { if let Err(e) = update_group(config, "skynet-users", &[user.to_string()], false).await {
println!("Couldnt add {} to skynet-users: {:?}", user, e) println!("Couldnt add {} to skynet-users: {:?}", user, e)
} }
} }