match self {
AnyDatabase::Memory(db) => match 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."),
},
#[cfg(feature = "key-value-db")]
None => None,
};
- let confirmation_time = match (timestamp, height) {
- (Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
+ let confirmation_time = match (height, timestamp) {
+ (Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
_ => None,
};
let height: Option<u32> = row.get(5)?;
let verified: bool = row.get(6)?;
- let confirmation_time = match (timestamp, height) {
- (Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
+ let confirmation_time = match (height, timestamp) {
+ (Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
_ => None,
};
None => None,
};
- let confirmation_time = match (timestamp, height) {
- (Some(timestamp), Some(height)) => Some(ConfirmationTime { timestamp, height }),
+ let confirmation_time = match (height, timestamp) {
+ (Some(height), Some(timestamp)) => Some(ConfirmationTime { height, timestamp }),
_ => None,
};