Skip to content

Commit

Permalink
Give correct advice for installing cargo-afl
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jan 7, 2024
1 parent 36f6c46 commit 9101dbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cargo-test-fuzz/src/lib.rs
Expand Up @@ -545,7 +545,6 @@ fn check_test_fuzz_and_afl_versions(
executable.test_fuzz_version.as_ref(),
"cargo-test-fuzz",
&cargo_test_fuzz_version,
"cargo-test-fuzz",
)?;
#[allow(clippy::expect_used)]
check_dependency_version(
Expand All @@ -558,7 +557,6 @@ fn check_test_fuzz_and_afl_versions(
.expect("Could not lock `CARGO_AFL_VERSION`")
.as_ref()
.expect("Could not determine `cargo-afl` version"),
"afl",
)?;
}
Ok(())
Expand Down Expand Up @@ -598,7 +596,6 @@ fn check_dependency_version(
dependency_version: Option<&Version>,
binary: &str,
binary_version: &Version,
krate: &str,
) -> Result<()> {
if let Some(dependency_version) = dependency_version {
ensure!(
Expand All @@ -614,7 +611,7 @@ fn check_dependency_version(
if !as_version_req(dependency_version).matches(binary_version) {
eprintln!(
"`{name}` depends on `{dependency} {dependency_version}`, which is newer than \
`{binary} {binary_version}`. Consider upgrading with `cargo install {krate} \
`{binary} {binary_version}`. Consider upgrading with `cargo install {binary} \
--force --version '>={dependency_version}'`."
);
}
Expand Down
2 changes: 1 addition & 1 deletion cargo-test-fuzz/tests/install.rs
Expand Up @@ -80,7 +80,7 @@ fn newer_afl() -> Result<()> {
)],
&[
"^`[^`]*` depends on `afl [^`]*`, which is newer than `cargo-afl [^`]*`.",
"Consider upgrading with `cargo install afl --force --version [^`]*`.$",
"Consider upgrading with `cargo install cargo-afl --force --version [^`]*`.$",
],
)
}
Expand Down

0 comments on commit 9101dbe

Please sign in to comment.