Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
j-chmielewski committed Mar 27, 2024
1 parent 631f48c commit 18b86d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ where
let method = split.get(1).unwrap_or(&"unknown");
let path = split.get(3).unwrap_or(&"unknown");

let addr = split.get(5).and_then(|s| Some(s.replace('"', "")));
let addr = split.get(5).map(|s| s.replace('"', ""));
let ip = addr
.and_then(|s| s.split(":").next().map(|s| s.to_string()))
.and_then(|s| s.split(':').next().map(|s| s.to_string()))
.unwrap_or("unknown".to_string());
write!(writer, "{ip} {method} {path} ")?;
}
Expand Down

0 comments on commit 18b86d7

Please sign in to comment.