Skip to content

Commit 67d8f54

Browse files
committed
Eliminate use of snake case for function names
1 parent b114ede commit 67d8f54

File tree

9 files changed

+10
-13
lines changed

9 files changed

+10
-13
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ struct-field-names = "allow"
9090

9191
[workspace.metadata.unmaintained]
9292
ignore = [
93+
"atomic-polyfill",
9394
"parse_duration",
9495
"strip-ansi-escapes",
9596
# https://github.com/alacritty/vte/pull/122#issuecomment-2579278540

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Note, however, that just because a target was called with certain parameters dur
180180
Treat the target as though its name is `name` when adding a module to the enclosing scope. Expansion of the `test_fuzz` macro adds a module definition to the enclosing scope. By default, the module is named as follows:
181181

182182
- If the target does not appear in an `impl` block, the module is named `target_fuzz__`, where `target` is the name of the target.
183-
- If the target appears in an `impl` block, the module is named `path_target_fuzz__`, where `path` is the path of the `impl`'s `Self` type converted to snake case and joined with `_`.
183+
- If the target appears in an `impl` block, the module is named `path_target_fuzz__`, where `path` is the last segment of the `impl`'s `Self` type path.
184184

185185
However, use of this option causes the module to instead be named `name_fuzz__`. Example:
186186

cargo-test-fuzz/tests/integration/fuzz_generic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn fuzz_bar_asdfgh() {
2121
}
2222

2323
fn fuzz(test: &str, code: i32) {
24-
let corpus = corpus_directory_from_target("generic", "struct_target");
24+
let corpus = corpus_directory_from_target("generic", "Struct_target");
2525

2626
#[cfg_attr(dylint_lib = "general", allow(non_thread_safe_call_in_test))]
2727
remove_dir_all(&corpus).unwrap_or_default();
@@ -34,7 +34,7 @@ fn fuzz(test: &str, code: i32) {
3434
assert!(corpus.exists());
3535

3636
retry(3, || {
37-
fuzzable::test_fuzz("generic", "struct_target")
37+
fuzzable::test_fuzz("generic", "Struct_target")
3838
.unwrap()
3939
.args([
4040
"--exit-code",

cargo-test-fuzz/tests/integration/generic_args.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ fn generic() {
1010
test(
1111
"generic",
1212
"test_bound",
13-
"struct_target_bound",
13+
"Struct_target_bound",
1414
&impl_expected,
1515
&expected,
1616
);
1717
test(
1818
"generic",
1919
"test_where_clause",
20-
"struct_target_where_clause",
20+
"Struct_target_where_clause",
2121
&impl_expected,
2222
&expected,
2323
);
2424
test(
2525
"generic",
2626
"test_only_generic_args",
27-
"struct_target_only_generic_args",
27+
"Struct_target_only_generic_args",
2828
&impl_expected,
2929
&expected,
3030
);

fuzzable/tests/self_ty_in_mod_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ impl Struct {
1010
}
1111

1212
#[cfg(feature = "__self_ty_conflict")]
13-
mod struct_target_fuzz__ {}
13+
mod Struct_target_fuzz__ {}

macro/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ proc-macro = true
1414

1515
[dependencies]
1616
darling = { workspace = true }
17-
heck = { workspace = true }
1817
itertools = { workspace = true }
1918
prettyplease = { workspace = true }
2019
proc-macro2 = { workspace = true }

macro/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,9 +1160,7 @@ fn mod_ident(opts: &TestFuzzOpts, self_ty_base: Option<&Ident>, target_ident: &I
11601160
s.push_str(&name.to_string());
11611161
} else {
11621162
if let Some(ident) = self_ty_base {
1163-
s.push_str(&<str as heck::ToSnakeCase>::to_snake_case(
1164-
&ident.to_string(),
1165-
));
1163+
s.push_str(&ident.to_string());
11661164
s.push('_');
11671165
}
11681166
s.push_str(&target_ident.to_string());

test-fuzz/tests/integration/self_ty_in_mod_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn self_ty_conflict() {
1818
.logged_assert()
1919
.failure()
2020
.stderr(predicate::str::contains(
21-
"the name `struct_target_fuzz__` is defined multiple times",
21+
"the name `Struct_target_fuzz__` is defined multiple times",
2222
));
2323
}
2424

0 commit comments

Comments
 (0)