Skip to content

Commit

Permalink
Clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Feb 12, 2022
1 parent 9f75f57 commit 2c0ff86
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 @@ -403,7 +403,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 2c0ff86

Please sign in to comment.