aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askama_shared/src/filters/mod.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
index 672c5b3..a001357 100644
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -224,15 +224,12 @@ pub fn capitalize(s: &fmt::Display) -> Result<String> {
&*s
}) {
None => Ok(s),
- _ => {
- let l = s.len();
- match s.get_mut(1..l).map(|s| {
- s.make_ascii_lowercase();
- &*s
- }) {
- _ => Ok(s),
- }
- }
+ _ => match s.get_mut(1..).map(|s| {
+ s.make_ascii_lowercase();
+ &*s
+ }) {
+ _ => Ok(s),
+ },
}
}