@@ -114,12 +114,12 @@ fn has_arg_flag(name: &str) -> bool {
114114
115115/// Yields all values of command line flag `name` as `Ok(arg)`, and all other arguments except
116116/// the flag as `Err(arg)`.
117- struct ArgFlagValueWithOtherArgsIter < ' a , I > {
117+ struct ArgSplitFlagValue < ' a , I > {
118118 args : TakeWhile < I , fn ( & String ) -> bool > ,
119119 name : & ' a str ,
120120}
121121
122- impl < ' a , I : Iterator < Item = String > > ArgFlagValueWithOtherArgsIter < ' a , I > {
122+ impl < ' a , I : Iterator < Item = String > > ArgSplitFlagValue < ' a , I > {
123123 fn new ( args : I , name : & ' a str ) -> Self {
124124 Self {
125125 // Stop searching at `--`.
@@ -129,7 +129,7 @@ impl<'a, I: Iterator<Item = String>> ArgFlagValueWithOtherArgsIter<'a, I> {
129129 }
130130}
131131
132- impl < I : Iterator < Item = String > > Iterator for ArgFlagValueWithOtherArgsIter < ' _ , I > {
132+ impl < I : Iterator < Item = String > > Iterator for ArgSplitFlagValue < ' _ , I > {
133133 type Item = Result < String , String > ;
134134
135135 fn next ( & mut self ) -> Option < Self :: Item > {
@@ -151,11 +151,11 @@ impl<I: Iterator<Item = String>> Iterator for ArgFlagValueWithOtherArgsIter<'_,
151151}
152152
153153/// Yields all values of command line flag `name`.
154- struct ArgFlagValueIter < ' a > ( ArgFlagValueWithOtherArgsIter < ' a , env:: Args > ) ;
154+ struct ArgFlagValueIter < ' a > ( ArgSplitFlagValue < ' a , env:: Args > ) ;
155155
156156impl < ' a > ArgFlagValueIter < ' a > {
157157 fn new ( name : & ' a str ) -> Self {
158- Self ( ArgFlagValueWithOtherArgsIter :: new ( env:: args ( ) , name) )
158+ Self ( ArgSplitFlagValue :: new ( env:: args ( ) , name) )
159159 }
160160}
161161
@@ -484,7 +484,7 @@ fn detect_target_dir() -> PathBuf {
484484 // The `build.target-dir` config can by passed by `--config` flags, so forward them to
485485 // `cargo metadata`.
486486 let config_flag = "--config" ;
487- for arg in ArgFlagValueWithOtherArgsIter :: new (
487+ for arg in ArgSplitFlagValue :: new (
488488 env:: args ( ) . skip ( 3 ) , // skip the program name, "miri" and "run" / "test"
489489 config_flag,
490490 ) {
@@ -570,7 +570,7 @@ fn phase_cargo_miri(mut args: env::Args) {
570570 let mut target_dir = None ;
571571
572572 // Forward all arguments before `--` other than `--target-dir` and its value to Cargo.
573- for arg in ArgFlagValueWithOtherArgsIter :: new ( & mut args, "--target-dir" ) {
573+ for arg in ArgSplitFlagValue :: new ( & mut args, "--target-dir" ) {
574574 match arg {
575575 Ok ( value) => target_dir = Some ( value. into ( ) ) ,
576576 Err ( arg) => drop ( cmd. arg ( arg) ) ,
0 commit comments