Skip to content

Commit de5201f

Browse files
MandragorianRalfJung
authored andcommitted
address comments
1 parent d12597f commit de5201f

File tree

1 file changed

+4
-4
lines changed
  • src/tools/miri/miri-script/src

1 file changed

+4
-4
lines changed

src/tools/miri/miri-script/src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod util;
66

77
use std::ops::Range;
88

9-
use anyhow::{Context, Result, anyhow};
9+
use anyhow::{Context, Result, anyhow, bail};
1010
use clap::{Parser, Subcommand};
1111

1212
/// Parses a seed range
@@ -144,7 +144,7 @@ impl Command {
144144
Ok(())
145145
}
146146
Self::Bench { .. } | Self::RustcPull { .. } | Self::RustcPush { .. } =>
147-
Err(anyhow::Error::msg("unexpected \"--\" found in arguments")),
147+
bail!("unexpected \"--\" found in arguments"),
148148
}
149149
}
150150
}
@@ -156,8 +156,8 @@ pub struct Cli {
156156
}
157157

158158
fn main() -> Result<()> {
159-
/// Split the arguments into the part before the `--` and the part after.
160-
/// The `--` itself ends up in the second part.
159+
// Split the arguments into the part before the `--` and the part after.
160+
// The `--` itself ends up in the second part.
161161
let miri_args: Vec<_> = std::env::args().take_while(|x| *x != "--").collect();
162162
let remainder: Vec<_> = std::env::args().skip_while(|x| *x != "--").collect();
163163

0 commit comments

Comments
 (0)