Skip to content

Commit

Permalink
Removed unnecessary clones
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsanchezq committed Aug 3, 2020
1 parent 8b4dcc8 commit 4f61915
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vit-servicing-station-lib/src/logging/mod.rs
Expand Up @@ -6,7 +6,7 @@ use std::time::Duration;

pub fn log_request_elapsed_time(elapsed_time: Duration) {
let elapsed = elapsed_time.as_nanos().to_string();
let metadata = json!({ "elapsed_nano_seconds" : elapsed.clone() });
let metadata = json!({ "elapsed_nano_seconds": elapsed });
DefaultLogMessageBuilder::new()
.with_level(log::Level::Info)
.with_tags(vec!["request", "elapsed"])
Expand All @@ -18,7 +18,7 @@ pub fn log_request_elapsed_time(elapsed_time: Duration) {
}

pub fn log_rejected_api_key(api_key: String) {
let metadata = json!({ "api_key" : api_key.clone() });
let metadata = json!({ "api_key": api_key });
DefaultLogMessageBuilder::new()
.with_level(log::Level::Info)
.with_tags(vec!["api_key", "reject"])
Expand Down

0 comments on commit 4f61915

Please sign in to comment.