Parent [>]
1//! Custom Askama filters.
2
3/// Returns `singular` if `count == 1`, otherwise `plural`.
4#[allow(dead_code)]
5pub fn pluralize(count: &usize, singular: &str, plural: &str) -> askama::Result<String> {
6    Ok(if *count == 1 {
7        singular.to_string()
8    } else {
9        plural.to_string()
10    })
11}