Skip to content

Commit

Permalink
Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and Kijewski committed May 2, 2024
1 parent cefa443 commit 0cb9fbb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions askama/src/filters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@ pub fn wordcount(s: impl ToString) -> Result<usize, Infallible> {
#[cfg(test)]
mod tests {
use super::*;
#[cfg(feature = "num-traits")]
use std::f64::INFINITY;

#[cfg(feature = "humansize")]
#[test]
Expand Down Expand Up @@ -676,8 +674,8 @@ mod tests {
assert_eq!(into_f64(1).unwrap(), 1.0_f64);
assert_eq!(into_f64(1.9).unwrap(), 1.9_f64);
assert_eq!(into_f64(-1.9).unwrap(), -1.9_f64);
assert_eq!(into_f64(INFINITY as f32).unwrap(), INFINITY);
assert_eq!(into_f64(-INFINITY as f32).unwrap(), -INFINITY);
assert_eq!(into_f64(f32::INFINITY).unwrap(), f64::INFINITY);
assert_eq!(into_f64(-f32::INFINITY).unwrap(), -f64::INFINITY);
}

#[cfg(feature = "num-traits")]
Expand All @@ -688,7 +686,7 @@ mod tests {
assert_eq!(into_isize(-1.9).unwrap(), -1_isize);
assert_eq!(into_isize(1.5_f64).unwrap(), 1_isize);
assert_eq!(into_isize(-1.5_f64).unwrap(), -1_isize);
match into_isize(INFINITY) {
match into_isize(f64::INFINITY) {
Err(Fmt(fmt::Error)) => {}
_ => panic!("Should return error of type Err(Fmt(fmt::Error))"),
};
Expand Down

0 comments on commit 0cb9fbb

Please sign in to comment.