mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Fix clippy lints
This commit is contained in:
parent
f9febba2b0
commit
0a145cff3c
1 changed files with 2 additions and 2 deletions
4
build.rs
4
build.rs
|
@ -298,7 +298,7 @@ fn get_version(src_dir: &Path) -> String {
|
||||||
if !rev.is_empty() {
|
if !rev.is_empty() {
|
||||||
// If it contains a ".", we have a proper version like "3.7",
|
// If it contains a ".", we have a proper version like "3.7",
|
||||||
// or "23.2.1-1234-gfab1234"
|
// or "23.2.1-1234-gfab1234"
|
||||||
if rev.contains(".") {
|
if rev.contains('.') {
|
||||||
return rev;
|
return rev;
|
||||||
}
|
}
|
||||||
// If it doesn't, we probably got *just* the commit SHA,
|
// 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
|
// .git/HEAD contains ref: refs/heads/branch
|
||||||
let headpath = gitdir.join("HEAD");
|
let headpath = gitdir.join("HEAD");
|
||||||
let headstr = read_to_string(headpath)?;
|
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
|
// .git/refs/heads/branch contains the SHA
|
||||||
let refpath = gitdir.join(headref);
|
let refpath = gitdir.join(headref);
|
||||||
|
|
Loading…
Reference in a new issue