Skip to content

style: Fix +nightly clippy lints for all targets/features. #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/table_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,8 @@ mod test {
// should probably test against what C thinks is going on :)
let input = unsafe {
std::slice::from_raw_parts(
(*tables.inner).indexes.edge_insertion_order,
(*tables.inner).indexes.num_edges as usize,
tables.inner.indexes.edge_insertion_order,
tables.inner.indexes.num_edges as usize,
)
};

Expand All @@ -1414,8 +1414,8 @@ mod test {

let output = unsafe {
std::slice::from_raw_parts(
(*tables.inner).indexes.edge_removal_order,
(*tables.inner).indexes.num_edges as usize,
tables.inner.indexes.edge_removal_order,
tables.inner.indexes.num_edges as usize,
)
};
assert!(!output.is_empty());
Expand Down Expand Up @@ -1692,7 +1692,7 @@ mod test {
let tables2 = TableCollection::new_from_file(treefile).unwrap();
assert!(tables.equals(&tables2, TableEqualityOptions::default()));

std::fs::remove_file(&treefile).unwrap();
std::fs::remove_file(treefile).unwrap();
}

#[test]
Expand Down Expand Up @@ -1893,7 +1893,7 @@ mod test_adding_individual {
#[test]
fn test_adding_individual_without_metadata() {
let mut tables = make_empty_table_collection(10.);
match tables.add_individual(0, &[0., 0., 0.], &[IndividualId::NULL, IndividualId::NULL]) {
match tables.add_individual(0, [0., 0., 0.], [IndividualId::NULL, IndividualId::NULL]) {
Ok(IndividualId(0)) => (),
_ => panic!("Expected NodeId(0)"),
};
Expand All @@ -1917,7 +1917,7 @@ mod test_adding_individual {
assert!(row.location.is_none());
assert!(row.parents.is_none());
let row_id = tables
.add_individual(0, &[0.2, 0.4, 0.6], &[1, 2, 3, 4])
.add_individual(0, [0.2, 0.4, 0.6], [1, 2, 3, 4])
.unwrap();
assert_eq!(row_id, 2);
assert_eq!(
Expand Down