remove unnecessary assignment.
This commit is contained in:
parent
3df99e72fd
commit
1a50e90514
@ -11,12 +11,9 @@ fn main() {
|
||||
if separators.contains(&c) {
|
||||
'_'
|
||||
} else {
|
||||
let x = c.to_lowercase().next();
|
||||
x.expect(&format!(
|
||||
"Error: couldn't convert character to lowercase: `{}`",
|
||||
c
|
||||
));
|
||||
x.unwrap()
|
||||
c.to_lowercase().next().unwrap_or_else(|| {
|
||||
panic!("Error: couldn't convert character to lowercase: `{}`", c)
|
||||
})
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user