Skip to content

Commit 29b4fe7

Browse files
committed
fix: more clippy warnings
1 parent 701ea8c commit 29b4fe7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sqlx-core/src/pool/inner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<DB: Database> PoolInner<DB> {
9494
self.on_closed.notify(usize::MAX);
9595
}
9696

97-
pub(super) fn close<'a>(self: &'a Arc<Self>) -> impl Future<Output = ()> + 'a {
97+
pub(super) fn close(self: &Arc<Self>) -> impl Future<Output = ()> + '_ {
9898
self.mark_closed();
9999

100100
async move {
@@ -124,7 +124,7 @@ impl<DB: Database> PoolInner<DB> {
124124
///
125125
/// If we steal a permit from the parent but *don't* open a connection,
126126
/// it should be returned to the parent.
127-
async fn acquire_permit<'a>(self: &'a Arc<Self>) -> Result<AsyncSemaphoreReleaser<'a>, Error> {
127+
async fn acquire_permit(self: &Arc<Self>) -> Result<AsyncSemaphoreReleaser<'_>, Error> {
128128
let parent = self
129129
.parent()
130130
// If we're already at the max size, we shouldn't try to steal from the parent.

sqlx-postgres/src/types/bit_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Decode<'_, Postgres> for BitVec {
5555
let len = usize::try_from(len).map_err(|_| format!("invalid VARBIT len: {len}"))?;
5656

5757
// The smallest amount of data we can read is one byte
58-
let bytes_len = (len + 7) / 8;
58+
let bytes_len = len.div_ceil(8);
5959

6060
if bytes.remaining() != bytes_len {
6161
Err(io::Error::new(

sqlx-sqlite/src/connection/intmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl<V: Eq> IntMap<V> {
128128
0
129129
};
130130
self.iter()
131-
.chain(std::iter::repeat(None).take(self_pad))
131+
.chain(std::iter::repeat_n(None, self_pad))
132132
.zip(prev.iter().chain(std::iter::repeat(None)))
133133
.enumerate()
134134
.filter(|(_i, (n, p))| n != p)

0 commit comments

Comments
 (0)