diff options
author | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-04-13 19:44:45 +0000 |
---|---|---|
committer | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-04-13 19:44:45 +0000 |
commit | e900dba1aaf8f169b91f2b3c5abc711109e25e35 (patch) | |
tree | 48795ad978c741441b12d564658a8a068cdb5f30 /src | |
parent | Fixed auth check (diff) | |
download | miniserve-e900dba1aaf8f169b91f2b3c5abc711109e25e35.tar.gz miniserve-e900dba1aaf8f169b91f2b3c5abc711109e25e35.zip |
Cargo fmt
Diffstat (limited to 'src')
-rw-r--r-- | src/args.rs | 12 | ||||
-rw-r--r-- | src/main.rs | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/args.rs b/src/args.rs index d1250c0..f858308 100644 --- a/src/args.rs +++ b/src/args.rs @@ -81,12 +81,20 @@ fn parse_auth(src: &str) -> Result<(String, String), String> { let username = match split.next() { Some(username) => username, - None => return Err("Invalid credentials string, expected format is username:password".to_owned()) + None => { + return Err( + "Invalid credentials string, expected format is username:password".to_owned(), + ) + } }; let password = match split.next() { Some(password) => password, - None => return Err("Invalid credentials string, expected format is username:password".to_owned()) + None => { + return Err( + "Invalid credentials string, expected format is username:password".to_owned(), + ) + } }; // Should we allow empty passwords ? diff --git a/src/main.rs b/src/main.rs index 37c68c9..2a43780 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,10 +139,7 @@ fn main() { addresses.push_str(&format!( "{}", Color::Green - .paint(format!( - "/{random_route}", - random_route = random_route, - )) + .paint(format!("/{random_route}", random_route = random_route,)) .bold() )); } |