Skip to content

Commit

Permalink
fixup! Josh preparations
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed May 2, 2024
1 parent 994aaeb commit d3d4b49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions clippy_dev/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@ fn rustc_version() -> String {
let version = String::from_utf8(
process::Command::new("rustc")
.arg("--version")
.arg("--verbose")
.output()
.expect("failed to run rustc")
.stdout,
)
.unwrap();
version
.rsplit_once('(')
.unwrap()
.1
.lines()
.find(|line| line.starts_with("commit-hash:"))
.expect("failed to parse `rustc -vV`")
.split_whitespace()
.next()
.expect("failed to get commit from `rustc --version`")
.nth(1)
.expect("failed to get commit from `rustc -vV`")
.to_string()
}

Expand Down

0 comments on commit d3d4b49

Please sign in to comment.