Skip to content

Commit

Permalink
Apply cargo clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Jul 16, 2024
1 parent fe31f10 commit 72b0626
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ fn restore_from_backup() {
assert!(i.size > 0);
});

let backup_id = info.get(0).unwrap().backup_id;
let backup_id = info.first().unwrap().backup_id;
let mut restore_option = RestoreOptions::default();
restore_option.set_keep_log_files(false); // true to keep log files
let restore_status = backup_engine.restore_from_backup(
Expand Down
5 changes: 1 addition & 4 deletions src/merge_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ impl<'a> Iterator for &'a mut MergeOperands {
let len = *len_ptr;
let ptr = base + (spacing * self.cursor);
self.cursor += 1;
Some(slice::from_raw_parts(
*(ptr as *const *const u8) as *const u8,
len,
))
Some(slice::from_raw_parts(*(ptr as *const *const u8), len))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/ops/multi_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ where
);
pinned_values
.into_iter()
.zip(errors.into_iter())
.zip(errors)
.map(|(v, e)| {
if e.is_null() {
if v.is_null() {
Expand All @@ -307,8 +307,8 @@ pub fn convert_values(
) -> Vec<Result<Option<DBVector>, Error>> {
values
.into_iter()
.zip(values_sizes.into_iter())
.zip(errors.into_iter())
.zip(values_sizes)
.zip(errors)
.map(|((v, s), e)| {
if e.is_null() {
if v.is_null() {
Expand Down

0 comments on commit 72b0626

Please sign in to comment.