Skip to content

Commit

Permalink
Fix clippy for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Sep 2, 2024
1 parent 375a548 commit 16c6b43
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ cli = [
"cargo_metadata",
]
coverage = ["fork", "libc"]

[lints.clippy]
needless_doctest_main = "allow"
3 changes: 3 additions & 0 deletions examples/url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ publish = false
[dependencies]
url = "2.5.0"
ziggy = { path = "../../", default-features = false }

[features]
fuzzing = []
2 changes: 1 addition & 1 deletion examples/url/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// could assert that a certain value satisfies a property.
fn invariant_fuzz(data: &str) {
if let Ok(parsed) = url::Url::parse(data) {
#[cfg(not(fuzzing))]
#[cfg(not(feature = "fuzzing"))]
println!("{data} => {parsed}");
// We assert that the string representation of the URL always contains a ':'
// character.
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo-ziggy/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ impl fmt::Display for FuzzingConfig {

pub fn kill_subprocesses_recursively(pid: &str) -> Result<(), Error> {
let subprocesses = process::Command::new("pgrep")
.arg(&format!("-P{pid}"))
.arg(format!("-P{pid}"))
.output()?;

for subprocess in std::str::from_utf8(&subprocesses.stdout)?.split('\n') {
Expand Down
2 changes: 1 addition & 1 deletion tests/arbitrary_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

fn kill_subprocesses_recursively(pid: &str) {
let subprocesses = process::Command::new("pgrep")
.arg(&format!("-P{pid}"))
.arg(format!("-P{pid}"))
.output()
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion tests/url_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

fn kill_subprocesses_recursively(pid: &str) {
let subprocesses = process::Command::new("pgrep")
.arg(&format!("-P{pid}"))
.arg(format!("-P{pid}"))
.output()
.unwrap();

Expand Down

0 comments on commit 16c6b43

Please sign in to comment.