From 0a145cff3cd223bbee2ab23f359a0c51941d0d57 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 14 Dec 2024 09:25:35 +0100 Subject: [PATCH] Fix clippy lints --- build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 05298dff0..5422f39b3 100644 --- a/build.rs +++ b/build.rs @@ -298,7 +298,7 @@ fn get_version(src_dir: &Path) -> String { if !rev.is_empty() { // If it contains a ".", we have a proper version like "3.7", // or "23.2.1-1234-gfab1234" - if rev.contains(".") { + if rev.contains('.') { return rev; } // If it doesn't, we probably got *just* the commit SHA, @@ -321,7 +321,7 @@ fn get_version(src_dir: &Path) -> String { // .git/HEAD contains ref: refs/heads/branch let headpath = gitdir.join("HEAD"); let headstr = read_to_string(headpath)?; - let headref = headstr.split(" ").collect::>()[1].trim(); + let headref = headstr.split(' ').collect::>()[1].trim(); // .git/refs/heads/branch contains the SHA let refpath = gitdir.join(headref);