Skip to content

Commit 8302a63

Browse files
committed
address comments
1 parent a99b58a commit 8302a63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

miri-script/src/main.rs

Lines changed: 4 additions & 4 deletions
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
@@ -142,7 +142,7 @@ impl Command {
142142
Ok(())
143143
}
144144
Self::Bench { .. } | Self::RustcPull { .. } | Self::RustcPush { .. } =>
145-
Err(anyhow::Error::msg("unexpected \"--\" found in arguments")),
145+
bail!("unexpected \"--\" found in arguments"),
146146
}
147147
}
148148
}
@@ -154,8 +154,8 @@ pub struct Cli {
154154
}
155155

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

0 commit comments

Comments
 (0)