aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 74f613f..be00227 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -93,10 +93,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
url.to_string(),
);
- let mut url_path = url.path();
- if url.path().is_empty() {
- url_path = "/";
- }
+ let url_path = if url.path().is_empty() {
+ "/"
+ } else {
+ url.path()
+ };
let previous_database = (*DATABASE.lock().unwrap()).get::<i32>(url_path);