Skip to content

Commit f36b9bd

Browse files
committed
thanks clippy
1 parent 39180b4 commit f36b9bd

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

gix-attributes/tests/search/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,8 @@ mod baseline {
307307

308308
let mut buf = Vec::new();
309309
let mut collection = MetadataCollection::default();
310-
let group = gix_attributes::Search::new_globals(
311-
&mut [base.join("user.attributes")].into_iter(),
312-
&mut buf,
313-
&mut collection,
314-
)?;
310+
let group =
311+
gix_attributes::Search::new_globals([base.join("user.attributes")].into_iter(), &mut buf, &mut collection)?;
315312

316313
Ok((group, collection, base, input))
317314
}

gix-odb/tests/odb/find/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn can_find(db: impl gix_object::Find, hex_id: &str) {
1616

1717
#[test]
1818
fn loose_object() {
19-
can_find(&db(), "37d4e6c5c48ba0d245164c4e10d5f41140cab980");
19+
can_find(db(), "37d4e6c5c48ba0d245164c4e10d5f41140cab980");
2020
}
2121

2222
#[test]

gix-odb/tests/odb/header/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn find_header(db: impl gix_odb::Header, hex_id: &str) -> gix_odb::find::Header
88

99
#[test]
1010
fn loose_object() {
11-
find_header(&db(), "37d4e6c5c48ba0d245164c4e10d5f41140cab980");
11+
find_header(db(), "37d4e6c5c48ba0d245164c4e10d5f41140cab980");
1212
}
1313

1414
#[test]

gix-pack/tests/pack/index.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ fn pack_lookup() -> Result<(), Box<dyn std::error::Error>> {
363363
},
364364
),
365365
] {
366-
let idx = index::File::at(&fixture_path(index_path), gix_hash::Kind::Sha1)?;
367-
let pack = pack::data::File::at(&fixture_path(pack_path), gix_hash::Kind::Sha1)?;
366+
let idx = index::File::at(fixture_path(index_path), gix_hash::Kind::Sha1)?;
367+
let pack = pack::data::File::at(fixture_path(pack_path), gix_hash::Kind::Sha1)?;
368368

369369
assert_eq!(pack.version(), pack::data::Version::V2);
370370
assert_eq!(pack.num_objects(), idx.num_objects());
@@ -471,7 +471,7 @@ fn iter() -> Result<(), Box<dyn std::error::Error>> {
471471
"0f3ea84cd1bba10c2a03d736a460635082833e59",
472472
),
473473
] {
474-
let idx = index::File::at(&fixture_path(path), gix_hash::Kind::Sha1)?;
474+
let idx = index::File::at(fixture_path(path), gix_hash::Kind::Sha1)?;
475475
assert_eq!(idx.version(), *kind);
476476
assert_eq!(idx.num_objects(), *num_objects);
477477
assert_eq!(

gix/tests/clone/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ mod blocking_io {
620620

621621
fn assure_index_entries_on_disk(index: &gix::worktree::Index, work_dir: &Path) {
622622
for entry in index.entries() {
623-
let entry_path = work_dir.join(gix_path::from_bstr(entry.path(&index)));
623+
let entry_path = work_dir.join(gix_path::from_bstr(entry.path(index)));
624624
assert!(entry_path.is_file(), "{entry_path:?} not found on disk")
625625
}
626626
}

gix/tests/repository/object.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod write_object {
66
#[test]
77
fn empty_tree() -> crate::Result {
88
let (_tmp, repo) = empty_bare_repo()?;
9-
let oid = repo.write_object(&gix::objs::TreeRef::empty())?;
9+
let oid = repo.write_object(gix::objs::TreeRef::empty())?;
1010
assert_eq!(
1111
oid,
1212
gix::hash::ObjectId::empty_tree(repo.object_hash()),
@@ -280,7 +280,7 @@ mod commit {
280280
crate::restricted(),
281281
)?
282282
.to_thread_local();
283-
let empty_tree_id = repo.write_object(&gix::objs::Tree::empty())?.detach();
283+
let empty_tree_id = repo.write_object(gix::objs::Tree::empty())?.detach();
284284
let err = repo
285285
.commit("HEAD", "initial", empty_tree_id, [empty_tree_id])
286286
.unwrap_err();
@@ -304,7 +304,7 @@ mod commit {
304304
restricted_and_git(),
305305
)?
306306
.to_thread_local();
307-
let empty_tree_id = repo.write_object(&gix::objs::Tree::empty())?;
307+
let empty_tree_id = repo.write_object(gix::objs::Tree::empty())?;
308308
let commit_id = repo.commit("HEAD", "initial", empty_tree_id, gix::commit::NO_PARENT_IDS)?;
309309
assert_eq!(
310310
commit_id,

gix/tests/repository/worktree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mod with_core_worktree_config {
4949
} else {
5050
assert_eq!(
5151
repo.work_dir().unwrap(),
52-
gix_path::realpath(&repo.git_dir().parent().unwrap().parent().unwrap().join("worktree"))?,
52+
gix_path::realpath(repo.git_dir().parent().unwrap().parent().unwrap().join("worktree"))?,
5353
"absolute workdirs are left untouched"
5454
);
5555
}

0 commit comments

Comments
 (0)