Skip to content

Commit

Permalink
Complete #443 (which was incomplete)
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Aug 21, 2024
1 parent 3e78cbe commit 4c54b35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 2 additions & 4 deletions cargo-test-fuzz/src/bin/cargo_test_fuzz/transition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ impl From<TestFuzzWithDeprecations> for super::TestFuzz {
}
}

#[allow(unused_macros)]
macro_rules! process_deprecated_action_object {
($opts:ident, $action:ident, $object_old:ident, $object_new:ident) => {
if $opts.$action == Some(Object::$object_old) {
Expand All @@ -231,10 +232,7 @@ macro_rules! process_deprecated_action_object {

#[allow(deprecated)]
pub(crate) fn cargo_test_fuzz<T: AsRef<OsStr>>(args: &[T]) -> Result<()> {
let SubCommand::TestFuzz(mut opts) = Opts::parse_from(args).subcmd;

process_deprecated_action_object!(opts, display, Concretizations, GenericArgs);
process_deprecated_action_object!(opts, display, ImplConcretizations, ImplGenericArgs);
let SubCommand::TestFuzz(opts) = Opts::parse_from(args).subcmd;

super::run(super::TestFuzz::from(opts))
}
Expand Down
7 changes: 0 additions & 7 deletions cargo-test-fuzz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,11 @@ bitflags! {
#[derive(Clone, Copy, Debug, Display, Deserialize, PartialEq, Eq, Serialize, ValueEnum)]
#[remain::sorted]
pub enum Object {
#[deprecated]
Concretizations,
Corpus,
CorpusInstrumented,
Crashes,
GenericArgs,
Hangs,
#[deprecated]
ImplConcretizations,
ImplGenericArgs,
Queue,
}
Expand Down Expand Up @@ -702,9 +698,6 @@ fn reset(opts: &TestFuzz, executable_targets: &[(Executable, Vec<String>)]) -> R
#[allow(clippy::panic)]
fn flags_and_dir(object: Object, krate: &str, target: &str) -> (Flags, PathBuf) {
match object {
Object::Concretizations | Object::ImplConcretizations => {
panic!("`{object}` should have been filter out")
}
Object::Corpus | Object::CorpusInstrumented => (
Flags::REQUIRES_CARGO_TEST,
corpus_directory_from_target(krate, target),
Expand Down

0 comments on commit 4c54b35

Please sign in to comment.