This commit is contained in:
Jun Kurihara 2022-07-22 22:28:26 +09:00
commit 45895ca7bc
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
12 changed files with 36 additions and 151 deletions

View file

@ -62,9 +62,7 @@ impl MessageLog {
self
}
pub fn xff(&mut self, xff: &Option<&hyper::header::HeaderValue>) -> &mut Self {
self.xff = xff
.map_or_else(|| "", |v| v.to_str().unwrap_or(""))
.to_string();
self.xff = xff.map_or_else(|| "", |v| v.to_str().unwrap_or("")).to_string();
self
}
pub fn upstream(&mut self, upstream: &str) -> &mut Self {