mirror of
https://github.com/actix/actix-web.git
synced 2024-11-26 03:21:08 +00:00
clippy
This commit is contained in:
parent
25c0673278
commit
3f03af1c59
2 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@ impl ConnectionInfo {
|
||||||
pub fn realip_remote_addr(&self) -> Option<&str> {
|
pub fn realip_remote_addr(&self) -> Option<&str> {
|
||||||
self.realip_remote_addr
|
self.realip_remote_addr
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.or_else(|| self.peer_addr.as_deref())
|
.or(self.peer_addr.as_deref())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns serialized IP address of the peer connection.
|
/// Returns serialized IP address of the peer connection.
|
||||||
|
|
|
@ -151,7 +151,7 @@ impl ResourceMap {
|
||||||
.char_indices()
|
.char_indices()
|
||||||
.filter_map(|(i, c)| (c == '/').then(|| i))
|
.filter_map(|(i, c)| (c == '/').then(|| i))
|
||||||
.nth(2)
|
.nth(2)
|
||||||
.unwrap_or_else(|| path.len());
|
.unwrap_or(path.len());
|
||||||
|
|
||||||
(
|
(
|
||||||
Cow::Borrowed(&path[..third_slash_index]),
|
Cow::Borrowed(&path[..third_slash_index]),
|
||||||
|
|
Loading…
Reference in a new issue