Skip to content

Commit

Permalink
Clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 19, 2022
1 parent 1aca7a6 commit 36d6a5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ fn build(target_os: &str) -> io::Result<()> {
}

fn os_from_triple(triple: &str) -> &str {
let platform = triple.splitn(2, '-').nth(1).expect("bad triple");
let platform = triple.split_once('-').map(|x| x.1).expect("bad triple");
platform
.trim_start_matches("unknown-")
.trim_start_matches("pc-")
Expand Down

0 comments on commit 36d6a5d

Please sign in to comment.