fix warnings

This commit is contained in:
Dietrich 2020-11-30 12:37:45 +01:00 committed by Franz Dietrich
parent df2f51a24e
commit 1e5a95a9f6
2 changed files with 4 additions and 4 deletions

View File

@ -243,7 +243,7 @@ impl UserDBWrite for UserDBLocal {
&group_file_content, &group_file_content,
&mut locked_g, &mut locked_g,
)?; )?;
let _gres = self.delete_group_by_id(group); self.delete_group_by_id(group);
} else { } else {
println!("Do not delete the group as the user to be deleted is not the only member"); 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. // remove the from the group instead of deleting the group if he was not the only user in its primary group.

View File

@ -44,9 +44,9 @@ fn test_delete_user_function() {
for line in pflines2 { for line in pflines2 {
assert!(!line.starts_with("teste")) assert!(!line.starts_with("teste"))
} }
let gf2 = fs::read_to_string(&g.path).unwrap(); let groupfile2 = fs::read_to_string(&g.path).unwrap();
let gflines2 = gf2.lines(); let groupfilelines2 = groupfile2.lines();
for line in gflines2 { for line in groupfilelines2 {
println!("{}", &line); println!("{}", &line);
assert!(!line.ends_with("teste")) assert!(!line.ends_with("teste"))
} }