use postfix negation instead of prefix

This commit is contained in:
Ralf Jung 2019-08-04 10:14:51 +02:00
parent 874437d717
commit 162c0ffb1f

View file

@ -4,6 +4,7 @@ use std::fs::{self, File};
use std::io::{self, Write, BufRead};
use std::path::{PathBuf, Path};
use std::process::Command;
use std::ops::Not;
const CARGO_MIRI_HELP: &str = r#"Interprets bin crates and tests in Miri
@ -250,9 +251,9 @@ fn setup(ask_user: bool) {
}
// FIXME: Install from crates.io again once a new xargo got released.
if !cargo().args(&["install", "xargo", "-f", "--git", "https://github.com/japaric/xargo"]).status()
if cargo().args(&["install", "xargo", "-f", "--git", "https://github.com/japaric/xargo"]).status()
.expect("failed to install xargo")
.success()
.success().not()
{
show_error(format!("Failed to install xargo"));
}
@ -326,9 +327,9 @@ path = "lib.rs"
command.arg("--target").arg(&target);
}
// Finally run it!
if !command.status()
if command.status()
.expect("failed to run xargo")
.success()
.success().not()
{
show_error(format!("Failed to run xargo"));
}