Fix clippy errors (#673)

This commit is contained in:
Arthur Petukhovsky
2021-09-27 18:59:30 +03:00
committed by GitHub
parent ca9af37478
commit 22e15844ae
3 changed files with 3 additions and 9 deletions

View File

@@ -133,11 +133,7 @@ where
found_start_point = true;
// It is an error to insert the same item to the tree twice.
assert!(
point
.elements
.iter()
.find(|x| Arc::ptr_eq(x, &item))
.is_none(),
!point.elements.iter().any(|x| Arc::ptr_eq(x, &item)),
"interval is already in the tree"
);
}
@@ -180,7 +176,7 @@ where
found_start_point = true;
}
let len_before = point.elements.len();
point.elements.retain(|other| !Arc::ptr_eq(other, &item));
point.elements.retain(|other| !Arc::ptr_eq(other, item));
let len_after = point.elements.len();
assert_eq!(len_after + 1, len_before);
if len_after == 0 {

View File

@@ -1,6 +1,4 @@
use anyhow::{bail, Result};
use hex;
use reqwest;
use serde::{Deserialize, Serialize};
use std::net::{IpAddr, SocketAddr};

View File

@@ -192,7 +192,7 @@ impl ProxyConnection {
.write_message_noflush(&BeMessage::ParameterStatus)?;
self.pgb.write_message(&BeMessage::ReadyForQuery)?;
return Ok(conn_info);
Ok(conn_info)
}
}
} else {