Skip to content

Commit

Permalink
Fix clippy nits
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlarsen committed Aug 17, 2023
1 parent 1cb358b commit ba82f1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/noseyparker/src/blob_id_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl <V: Copy> BlobIdMap<V> {
#[inline]
pub fn get(&self, blob_id: &BlobId) -> Option<V> {
let bucket: u8 = blob_id.as_bytes()[0];
self.maps[bucket as usize].lock().unwrap().get(&ObjectId::from(blob_id)).map(|v| *v)
self.maps[bucket as usize].lock().unwrap().get(&ObjectId::from(blob_id)).copied()
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/noseyparker/src/datastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl <'a> Transaction<'a> {
let (provenance_id, kind) = match p {
Provenance::File(e) => {
let path = e.path.as_os_str().as_bytes();
let payload_id = add_provenance_payload_file(&path)?;
let payload_id = add_provenance_payload_file(path)?;
let provenance_id = add_provenance("file", payload_id)?;
(provenance_id, None)
}
Expand All @@ -403,7 +403,7 @@ impl <'a> Transaction<'a> {
(provenance_id, None)
}
Some(c) => {
let commit_id = add_git_commit(&c)?;
let commit_id = add_git_commit(c)?;
let blob_path = c.blob_path.as_slice();
let payload_id = add_provenance_payload_git_commit(repo_path, commit_id, blob_path)?;
let provenance_id = add_provenance("git_commit", payload_id)?;
Expand Down

0 comments on commit ba82f1c

Please sign in to comment.