about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Andrikopoulos <gkonstandinos@gmail.com>2024-12-13 21:32:51 +0100
committerRalf Jung <post@ralfj.de>2024-12-14 09:39:20 +0100
commitde5201fe1fbb04fc5ebc417ce4046647e56393a7 (patch)
tree3dd2c225e49964906d630bb7fa3aed779cd5062f /src
parentd12597ff7b41d07c88593a4f99e917b1859e0596 (diff)
downloadrust-de5201fe1fbb04fc5ebc417ce4046647e56393a7.tar.gz
rust-de5201fe1fbb04fc5ebc417ce4046647e56393a7.zip
address comments
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/miri-script/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/miri/miri-script/src/main.rs b/src/tools/miri/miri-script/src/main.rs
index 1e816e7262d..ab0c4e13911 100644
--- a/src/tools/miri/miri-script/src/main.rs
+++ b/src/tools/miri/miri-script/src/main.rs
@@ -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
@@ -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"),
         }
     }
 }
@@ -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();