Code formatting

This commit is contained in:
phoenix
2025-03-13 19:37:51 -04:00
parent ac970a4302
commit b52607b4e3
4 changed files with 10 additions and 53 deletions
+8 -2
View File
@@ -27,15 +27,21 @@ impl UserManager {
pub fn parse_user_from_actions(&mut self) {
let args = &self.ica_action.flags;
// Quit the loop when two are found
let mut amt: i32 = 0;
for arg in args {
let flag = &arg.flag;
if flag == "-u" {
self.user.username = String::from(&arg.value);
amt += 1;
} else if flag == "-p" {
self.user.password = String::from(&arg.value);
amt += 1;
}
if flag == "-p" {
self.user.password = String::from(&arg.value);
if amt == 2 {
break;
}
}
}