Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
warning: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)`
  --> build.rs:20:20
   |
20 |       let mut path = out_path
   |  ____________________^
21 | |       .ancestors()
22 | |       .skip(3)
23 | |       .next()
   | |_____________^
   |
   = note: `#[warn(clippy::iter_skip_next)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
  • Loading branch information
nuxeh committed Jan 30, 2020
1 parent ba03ec7 commit 2078c81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ fn get_assets_dir() -> PathBuf{

let mut path = out_path
.ancestors()
.skip(3)
.next()
.nth(4)
.unwrap()
.to_owned();
path.push("assets");
Expand Down

0 comments on commit 2078c81

Please sign in to comment.