swap user/cred

This commit is contained in:
shimun 2019-10-29 23:20:19 +01:00
parent 521b3d79fc
commit 42a5a92e4b
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -39,10 +39,13 @@ impl Settings {
let line = line.unwrap(); let line = line.unwrap();
let mut parts = line.split(":"); let mut parts = line.split(":");
let user = parts.by_ref().next().unwrap(); let user = parts.by_ref().next().unwrap();
creds.push((user.to_string(), (&parts.collect::<Vec<_>>()[..].join(":")).to_string())); creds.push((
(&parts.collect::<Vec<_>>()[..].join(":")).to_string(),
user.to_string(),
));
} }
} }
Settings{ Settings {
user_credentials: creds, user_credentials: creds,
..Default::default() ..Default::default()
} }