Skip to content

Commit 3bacf42

Browse files
authored
style: Fix +nightly clippy lints for all targets/features. (#326)
* needless borrows * use auto-derefs where possible.
1 parent ad2cc0b commit 3bacf42

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/table_collection.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1397,8 +1397,8 @@ mod test {
13971397
// should probably test against what C thinks is going on :)
13981398
let input = unsafe {
13991399
std::slice::from_raw_parts(
1400-
(*tables.inner).indexes.edge_insertion_order,
1401-
(*tables.inner).indexes.num_edges as usize,
1400+
tables.inner.indexes.edge_insertion_order,
1401+
tables.inner.indexes.num_edges as usize,
14021402
)
14031403
};
14041404

@@ -1414,8 +1414,8 @@ mod test {
14141414

14151415
let output = unsafe {
14161416
std::slice::from_raw_parts(
1417-
(*tables.inner).indexes.edge_removal_order,
1418-
(*tables.inner).indexes.num_edges as usize,
1417+
tables.inner.indexes.edge_removal_order,
1418+
tables.inner.indexes.num_edges as usize,
14191419
)
14201420
};
14211421
assert!(!output.is_empty());
@@ -1692,7 +1692,7 @@ mod test {
16921692
let tables2 = TableCollection::new_from_file(treefile).unwrap();
16931693
assert!(tables.equals(&tables2, TableEqualityOptions::default()));
16941694

1695-
std::fs::remove_file(&treefile).unwrap();
1695+
std::fs::remove_file(treefile).unwrap();
16961696
}
16971697

16981698
#[test]
@@ -1893,7 +1893,7 @@ mod test_adding_individual {
18931893
#[test]
18941894
fn test_adding_individual_without_metadata() {
18951895
let mut tables = make_empty_table_collection(10.);
1896-
match tables.add_individual(0, &[0., 0., 0.], &[IndividualId::NULL, IndividualId::NULL]) {
1896+
match tables.add_individual(0, [0., 0., 0.], [IndividualId::NULL, IndividualId::NULL]) {
18971897
Ok(IndividualId(0)) => (),
18981898
_ => panic!("Expected NodeId(0)"),
18991899
};
@@ -1917,7 +1917,7 @@ mod test_adding_individual {
19171917
assert!(row.location.is_none());
19181918
assert!(row.parents.is_none());
19191919
let row_id = tables
1920-
.add_individual(0, &[0.2, 0.4, 0.6], &[1, 2, 3, 4])
1920+
.add_individual(0, [0.2, 0.4, 0.6], [1, 2, 3, 4])
19211921
.unwrap();
19221922
assert_eq!(row_id, 2);
19231923
assert_eq!(

0 commit comments

Comments
 (0)