Open WaffleLapkin opened 4 years ago
This happens on i
or t
in the second last position or s
in the last position (when the second last is not s
:
use inflector::Inflector;
fn main() {
for b_last_letter in b'a'..=b'z' {
let last_letter = b_last_letter as char;
for b_mid_letter in b'a'..=b'z' {
let mid_letter = b_mid_letter as char;
let class_case_string =
format!("a{}{}", mid_letter, last_letter).to_class_case();
if class_case_string != format!("A{}{}", mid_letter, last_letter) {
println!("a{}{} => {}",
mid_letter, last_letter, class_case_string);
}
}
}
}
outputs:
aia => Aum
ata => Aum
aas => Aa
abs => Ab
acs => Ac
ads => Ad
aes => Ae
afs => Af
ags => Ag
ahs => Ah
ais => Ai
ajs => Aj
aks => Ak
als => Al
ams => Am
ans => An
aos => Ao
aps => Ap
aqs => Aq
ars => Ar
ats => At
aus => Au
avs => Av
aws => Aw
axs => Ax
ays => Ay
azs => Az
The problem is the final to_singular()
.
This seems like the wrong behaviour to me...
This code:
Fails with this error: