Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandragorian authored and RalfJung committed Dec 14, 2024
1 parent 147bbd0 commit cb10ece
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions miri-script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod util;

use std::ops::Range;

use anyhow::{Context, Result, anyhow};
use anyhow::{Context, Result, anyhow, bail};
use clap::{Parser, Subcommand};

/// Parses a seed range
Expand Down Expand Up @@ -144,7 +144,7 @@ impl Command {
Ok(())
}
Self::Bench { .. } | Self::RustcPull { .. } | Self::RustcPush { .. } =>
Err(anyhow::Error::msg("unexpected \"--\" found in arguments")),
bail!("unexpected \"--\" found in arguments"),
}
}
}
Expand All @@ -156,8 +156,8 @@ pub struct Cli {
}

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

Expand Down

0 comments on commit cb10ece

Please sign in to comment.