Skip to content

Commit 75b8d15

Browse files
committed
Don't consider ascii_alphabetic characters to be simpler
1 parent 6ae6a60 commit 75b8d15

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

fuzzcheck/src/mutators/character_classes.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl CharacterMutator {
4444
let c = *ranges[0].start();
4545
Self::complexity_of_value(c)
4646
} else {
47-
7.0
47+
8.0
4848
};
4949
let max_cplx = if total_length == 1 {
5050
let c = *ranges[0].start();
@@ -76,12 +76,7 @@ impl CharacterMutator {
7676
}
7777
impl CharacterMutator {
7878
fn complexity_of_value(c: char) -> f64 {
79-
let cplx = (c.len_utf8() * 8) as f64;
80-
if c.is_ascii_alphabetic() {
81-
cplx - 1.0
82-
} else {
83-
cplx
84-
}
79+
(c.len_utf8() * 8) as f64
8580
}
8681
}
8782
impl Mutator<char> for CharacterMutator {

0 commit comments

Comments
 (0)