Skip to content

Commit 64e2d3e

Browse files
committed
Review comments
1 parent 40847ab commit 64e2d3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cargo-miri/bin.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn parse_cargo_miri_args(
422422
show_error(format!("\"--bin\" takes one argument."));
423423
}
424424
}
425-
arg if arg.starts_with("--bin=") => bin_targets.push((&arg[6..]).to_string()),
425+
arg if arg.starts_with("--bin=") => bin_targets.push((&arg["--bin=".len()..]).to_string()),
426426
arg if arg == "--test" => {
427427
if let Some(test) = args.next() {
428428
if test == "--" {
@@ -434,7 +434,7 @@ fn parse_cargo_miri_args(
434434
show_error(format!("\"--test\" takes one argument."));
435435
}
436436
}
437-
arg if arg.starts_with("--test=") => test_targets.push((&arg[7..]).to_string()),
437+
arg if arg.starts_with("--test=") => test_targets.push((&arg["--test=".len()..]).to_string()),
438438
other => additional_args.push(other),
439439
}
440440
}
@@ -466,6 +466,7 @@ fn in_cargo_miri() {
466466
return;
467467
}
468468

469+
// FIXME: this accepts --test, --lib, and multiple --bin for `cargo miri run`.
469470
let (target_filters, cargo_args, miri_args) =
470471
parse_cargo_miri_args(std::env::args().skip(skip));
471472

0 commit comments

Comments
 (0)