Skip to content

Commit

Permalink
style: fix lints from nightly (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen authored Nov 4, 2022
1 parent f8a7814 commit 906f9a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/tree_traversals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Params {
fn main() {
let params = Params::parse();

let treeseq = tskit::TreeSequence::load(&params.treefile).unwrap();
let treeseq = tskit::TreeSequence::load(params.treefile).unwrap();

let mut tree_iterator = treeseq.tree_iterator(tskit::TreeFlags::default()).unwrap();

Expand Down
6 changes: 3 additions & 3 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ mod tests {
let c = v.as_ptr() as *const libc::c_char;
let mut d = vec![];
for i in 0..v.len() {
d.push(unsafe { *c.add(i as usize) as u8 });
d.push(unsafe { *c.add(i) as u8 });
}
let df = F::decode(&d).unwrap();
assert_eq!(f.x, df.x);
Expand Down Expand Up @@ -386,7 +386,7 @@ mod test_serde {
let c = v.as_ptr() as *const libc::c_char;
let mut d = vec![];
for i in 0..v.len() {
d.push(unsafe { *c.add(i as usize) as u8 });
d.push(unsafe { *c.add(i) as u8 });
}
let df = F::decode(&d).unwrap();
assert_eq!(f.x, df.x);
Expand Down Expand Up @@ -414,7 +414,7 @@ mod test_serde {
let c = v.as_ptr() as *const libc::c_char;
let mut d = vec![];
for i in 0..v.len() {
d.push(unsafe { *c.add(i as usize) as u8 });
d.push(unsafe { *c.add(i) as u8 });
}
if crate::test_fixtures::bad_metadata::Ff::decode(&d).is_ok() {
panic!("expected an error!!");
Expand Down

0 comments on commit 906f9a1

Please sign in to comment.