mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-26 07:41:15 -03:00
Fix clippy lints
This commit is contained in:
4
build.rs
4
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_git_hash() -> Result<String, Box<dyn std::error::Error>> {
|
||||
// .git/HEAD contains ref: refs/heads/branch
|
||||
let headpath = gitdir.join("HEAD");
|
||||
let headstr = read_to_string(headpath)?;
|
||||
let headref = headstr.split(" ").collect::<Vec<_>>()[1].trim();
|
||||
let headref = headstr.split(' ').collect::<Vec<_>>()[1].trim();
|
||||
|
||||
// .git/refs/heads/branch contains the SHA
|
||||
let refpath = gitdir.join(headref);
|
||||
|
||||
Reference in New Issue
Block a user