diff options
author | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-04-13 19:37:30 +0000 |
---|---|---|
committer | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-04-13 19:37:30 +0000 |
commit | 56e68b3cf5833b405d489bcc12be92da01233e29 (patch) | |
tree | 60db85fc025bf29c29b19cf02b993be80e9704f8 /src/main.rs | |
parent | Update README.md (diff) | |
download | miniserve-56e68b3cf5833b405d489bcc12be92da01233e29.tar.gz miniserve-56e68b3cf5833b405d489bcc12be92da01233e29.zip |
Made code more idiomatic
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index fce9cf6..37c68c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,14 +134,14 @@ 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(), + random_route = random_route, )) .bold() )); |