We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c30d19d commit 8131f6eCopy full SHA for 8131f6e
miri-script/src/commands.rs
@@ -130,15 +130,15 @@ impl Command {
130
let new_commit = sh.read_file("rust-version")?.trim().to_owned();
131
let current_commit = {
132
let rustc_info = cmd!(sh, "rustc +miri --version -v").read();
133
- if rustc_info.is_err() {
134
- None
135
- } else {
136
- let metadata = rustc_version::version_meta_for(&rustc_info.unwrap())?;
+ if let Ok(rustc_info) = rustc_info {
+ let metadata = rustc_version::version_meta_for(&rustc_info)?;
137
Some(
138
metadata
139
.commit_hash
140
.ok_or_else(|| anyhow!("rustc metadata did not contain commit hash"))?,
141
)
+ } else {
+ None
142
}
143
};
144
// Check if we already are at that commit.
0 commit comments