From 42a5a92e4b08e9329d94742e0191ced6b1e88ffc Mon Sep 17 00:00:00 2001 From: shimun Date: Tue, 29 Oct 2019 23:20:19 +0100 Subject: [PATCH] swap user/cred --- src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 665eedf..8fd0738 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,10 +39,13 @@ impl Settings { let line = line.unwrap(); let mut parts = line.split(":"); let user = parts.by_ref().next().unwrap(); - creds.push((user.to_string(), (&parts.collect::>()[..].join(":")).to_string())); + creds.push(( + (&parts.collect::>()[..].join(":")).to_string(), + user.to_string(), + )); } } - Settings{ + Settings { user_credentials: creds, ..Default::default() }