diff --git a/src/userlib/mod.rs b/src/userlib/mod.rs index 516803e..829d6b7 100644 --- a/src/userlib/mod.rs +++ b/src/userlib/mod.rs @@ -243,7 +243,7 @@ impl UserDBWrite for UserDBLocal { &group_file_content, &mut locked_g, )?; - let _gres = self.delete_group_by_id(group); + self.delete_group_by_id(group); } else { println!("Do not delete the group as the user to be deleted is not the only member"); // remove the from the group instead of deleting the group if he was not the only user in its primary group. diff --git a/tests/delete_user_test.rs b/tests/delete_user_test.rs index 0684a07..6624589 100644 --- a/tests/delete_user_test.rs +++ b/tests/delete_user_test.rs @@ -44,9 +44,9 @@ fn test_delete_user_function() { for line in pflines2 { assert!(!line.starts_with("teste")) } - let gf2 = fs::read_to_string(&g.path).unwrap(); - let gflines2 = gf2.lines(); - for line in gflines2 { + let groupfile2 = fs::read_to_string(&g.path).unwrap(); + let groupfilelines2 = groupfile2.lines(); + for line in groupfilelines2 { println!("{}", &line); assert!(!line.ends_with("teste")) }