Skip to content

Commit

Permalink
Fix clippy for Rust 1.84.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gsserge committed Jan 10, 2025
1 parent 855d41b commit c3bcc57
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl SerializableSnapshotIsolation {
Some(entries)
if entries
.last()
.map_or(false, |e| e.e.is_deleted_or_tombstone()) =>
.is_some_and(|e| e.e.is_deleted_or_tombstone()) =>
{
// Key is being deleted in current txn, don't count as conflict
continue;
Expand Down
5 changes: 1 addition & 4 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,7 @@ impl RecordReader {
self.rec.clear();

let mut tx = Record::new();
match self.read_into(&mut tx) {
Ok(value_offsets) => value_offsets,
Err(e) => return Err(e),
};
self.read_into(&mut tx)?;

let mut rec = BytesMut::new();
tx.encode(&mut rec)?;
Expand Down
2 changes: 1 addition & 1 deletion src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ impl Core {
value_offset: u64,
indexer: &mut Indexer,
) -> Result<()> {
if entry.metadata.as_ref().map_or(false, |metadata| {
if entry.metadata.as_ref().is_some_and(|metadata| {
metadata.is_deleted() || metadata.is_tombstone() && !opts.enable_versions
}) {
indexer.delete(&mut entry.key[..].into());
Expand Down
2 changes: 1 addition & 1 deletion src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ impl Transaction {
// Iterate over the keys in the range.
for (key, value, _, ts) in ranger {
// If the key changes, process the previous key's versions.
if current_key.as_ref().map_or(false, |k| k != &key) {
if current_key.as_ref().is_some_and(|k| k != &key) {
// Add the previous key's versions to the results.
results.append(&mut current_key_versions);

Expand Down

0 comments on commit c3bcc57

Please sign in to comment.