1
Fork 0

use char instead of &str for single char patterns

This commit is contained in:
Matthias Krüger 2020-02-26 13:03:46 +01:00
parent a8437cf213
commit 7c84ba1124
30 changed files with 44 additions and 44 deletions

View file

@ -86,7 +86,7 @@ pub type NameDoc = (String, Option<String>);
crate fn ensure_trailing_slash(v: &str) -> impl fmt::Display + '_ {
crate::html::format::display_fn(move |f| {
if !v.ends_with("/") && !v.is_empty() { write!(f, "{}/", v) } else { write!(f, "{}", v) }
if !v.ends_with('/') && !v.is_empty() { write!(f, "{}/", v) } else { write!(f, "{}", v) }
})
}