From 2c0ff86e7bb5e3d9d179dbfef93a5b65f3cb4f59 Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 19 Jan 2022 14:41:23 +0000 Subject: [PATCH] Clippy lint --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 78c89b9..a5ff194 100644 --- a/build.rs +++ b/build.rs @@ -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-")