mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 17:41:11 +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> {
|
||||
self.realip_remote_addr
|
||||
.as_deref()
|
||||
.or_else(|| self.peer_addr.as_deref())
|
||||
.or(self.peer_addr.as_deref())
|
||||
}
|
||||
|
||||
/// Returns serialized IP address of the peer connection.
|
||||
|
|
|
@ -151,7 +151,7 @@ impl ResourceMap {
|
|||
.char_indices()
|
||||
.filter_map(|(i, c)| (c == '/').then(|| i))
|
||||
.nth(2)
|
||||
.unwrap_or_else(|| path.len());
|
||||
.unwrap_or(path.len());
|
||||
|
||||
(
|
||||
Cow::Borrowed(&path[..third_slash_index]),
|
||||
|
|
Loading…
Reference in a new issue