mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 20:45:29 +00:00
Use inspect_err instead of map_err
Fixes a clippy warning.
This commit is contained in:
parent
01fc8c7936
commit
e0a814eb1b
1 changed files with 1 additions and 2 deletions
|
|
@ -555,10 +555,9 @@ where
|
||||||
std::str::from_utf8(&request[..len - 2]).or(Err((BAD_REQUEST, "Non-UTF-8 request")))
|
std::str::from_utf8(&request[..len - 2]).or(Err((BAD_REQUEST, "Non-UTF-8 request")))
|
||||||
});
|
});
|
||||||
|
|
||||||
let request = result.map_err(|e| {
|
let request = result.inspect_err(|_| {
|
||||||
// write empty request to log line for uniformity
|
// write empty request to log line for uniformity
|
||||||
write!(self.log_line, " \"\"").unwrap();
|
write!(self.log_line, " \"\"").unwrap();
|
||||||
e
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// log literal request (might be different from or not an actual URL)
|
// log literal request (might be different from or not an actual URL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue