Fix clippy warning
This commit is contained in:
@@ -320,6 +320,7 @@ impl BatchDatabase for AnyDatabase {
|
|||||||
match self {
|
match self {
|
||||||
AnyDatabase::Memory(db) => match batch {
|
AnyDatabase::Memory(db) => match batch {
|
||||||
AnyBatch::Memory(batch) => db.commit_batch(batch),
|
AnyBatch::Memory(batch) => db.commit_batch(batch),
|
||||||
|
#[cfg(any(feature = "key-value-db", feature = "sqlite"))]
|
||||||
_ => unimplemented!("Other batch shouldn't be used with Memory db."),
|
_ => unimplemented!("Other batch shouldn't be used with Memory db."),
|
||||||
},
|
},
|
||||||
#[cfg(feature = "key-value-db")]
|
#[cfg(feature = "key-value-db")]
|
||||||
|
|||||||
@@ -374,8 +374,8 @@ impl SqliteDatabase {
|
|||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let confirmation_time = match (timestamp, height) {
|
let confirmation_time = match (height, timestamp) {
|
||||||
(Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
|
(Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -408,8 +408,8 @@ impl SqliteDatabase {
|
|||||||
let height: Option<u32> = row.get(5)?;
|
let height: Option<u32> = row.get(5)?;
|
||||||
let verified: bool = row.get(6)?;
|
let verified: bool = row.get(6)?;
|
||||||
|
|
||||||
let confirmation_time = match (timestamp, height) {
|
let confirmation_time = match (height, timestamp) {
|
||||||
(Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
|
(Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -451,8 +451,8 @@ impl SqliteDatabase {
|
|||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let confirmation_time = match (timestamp, height) {
|
let confirmation_time = match (height, timestamp) {
|
||||||
(Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
|
(Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user