diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2019-04-15 19:16:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 19:16:01 +0000 |
commit | a2951b17957398edeb8ec94fe58f6839aafaef91 (patch) | |
tree | 7774d763ce380766e7b0f081a9f93dae419ad2e3 /src/main.rs | |
parent | Merge pull request #65 from boastful-squirrel/socketaddr (diff) | |
parent | Fix typo in comment (diff) | |
download | miniserve-a2951b17957398edeb8ec94fe58f6839aafaef91.tar.gz miniserve-a2951b17957398edeb8ec94fe58f6839aafaef91.zip |
Merge pull request #64 from boastful-squirrel/fix_auth
Fix auth check
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index a413f2b..42a43b5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -138,15 +138,12 @@ fn main() { )) .bold() )); - let random_route = miniserve_config.clone().random_route; - if random_route.is_some() { + + if let Some(random_route) = miniserve_config.clone().random_route { addresses.push_str(&format!( "{}", Color::Green - .paint(format!( - "/{random_route}", - random_route = random_route.unwrap(), - )) + .paint(format!("/{random_route}", random_route = random_route,)) .bold() )); } |