diff options
Diffstat (limited to 'src/console.rs')
-rw-r--r-- | src/console.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/console.rs b/src/console.rs index 6e2649f..4148ded 100644 --- a/src/console.rs +++ b/src/console.rs @@ -46,7 +46,6 @@ lazy_static! { } pub async fn log(ip: IpAddr, method: Method, uri: Uri, path: Option<String>, body: Option<String>) { - let path = path.unwrap_or_default(); let body = body.unwrap_or_default(); @@ -202,11 +201,13 @@ impl Formatter for HtmlFormatter { } pub fn sanatize(input: String) -> String { - input.replace("&", "&").replace("<", "<").replace(">", ">") + input + .replace('&', "&") + .replace('<', "<") + .replace('>', ">") } pub fn beautify(body: String) -> String { - let body = sanatize(body); if body.is_empty() { |