Skip to content

Commit add16c5

Browse files
author
Vincent Rouillé
committed
fix cargo clippy warning
1 parent 174ada3 commit add16c5

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

foundationdb-bench/src/bin/fdb-bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl Bench {
6161
let counter = counter.clone();
6262
let b = self.clone();
6363
let handle = std::thread::spawn(move || {
64-
futures::executor::block_on(b.clone().run_range(range, counter))
64+
futures::executor::block_on(b.run_range(range, counter))
6565
});
6666
handles.push(handle);
6767

foundationdb-bindingtester/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ impl TransactionState {
412412
S::Transaction(ref mut tr) => tr,
413413
S::TransactionCancelled(ref mut tr) => unsafe {
414414
// rust binding prevent accessing cancelled transaction
415-
std::mem::transmute(tr)
415+
&mut *(tr as *mut TransactionCancelled as *mut Transaction)
416416
},
417417
_ => panic!("transaction is owned by a future that is still not done"),
418418
}

foundationdb/src/database.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ pub trait DatabaseTransact: Sized {
224224
fn transact(self, trx: Transaction) -> Self::Future;
225225
}
226226

227+
#[allow(clippy::needless_lifetimes)]
228+
#[allow(clippy::type_complexity)]
227229
mod boxed {
228230
use super::*;
229231

@@ -275,6 +277,8 @@ mod boxed {
275277
}
276278
}
277279

280+
#[allow(clippy::needless_lifetimes)]
281+
#[allow(clippy::type_complexity)]
278282
mod boxed_local {
279283
use super::*;
280284

foundationdb/src/future.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ pub struct FdbValuesIter {
343343
impl Iterator for FdbValuesIter {
344344
type Item = FdbValue;
345345
fn next(&mut self) -> Option<Self::Item> {
346+
#[allow(clippy::iter_nth_zero)]
346347
self.nth(0)
347348
}
348349

0 commit comments

Comments
 (0)