mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-15 20:20:38 +00:00
Fix clippy errors (#673)
This commit is contained in:
committed by
GitHub
parent
ca9af37478
commit
22e15844ae
@@ -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 {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use anyhow::{bail, Result};
|
||||
use hex;
|
||||
use reqwest;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user