aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
authorLibravatar vallentin <mail@vallentin.dev>2021-01-01 16:48:59 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-01-01 18:04:07 +0100
commitc12b79b315a4ae4cdbd8ba135ebb3eff5377e94b (patch)
tree741f615fe3c6a3021e4bd0468a755c58b753c7f1 /askama_shared/src
parent483281a1161cb52ba89670219672ae2950c99092 (diff)
downloadaskama-c12b79b315a4ae4cdbd8ba135ebb3eff5377e94b.tar.gz
askama-c12b79b315a4ae4cdbd8ba135ebb3eff5377e94b.tar.bz2
askama-c12b79b315a4ae4cdbd8ba135ebb3eff5377e94b.zip
Resolved Clippy lints
Diffstat (limited to 'askama_shared/src')
-rw-r--r--askama_shared/src/filters/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs
index dc2fbb0..35989ca 100644
--- a/askama_shared/src/filters/mod.rs
+++ b/askama_shared/src/filters/mod.rs
@@ -518,9 +518,9 @@ mod tests {
#[test]
#[allow(clippy::float_cmp)]
fn test_into_f64() {
- assert_eq!(into_f64(&1).unwrap(), 1.0 as f64);
- assert_eq!(into_f64(&1.9).unwrap(), 1.9 as f64);
- assert_eq!(into_f64(&-1.9).unwrap(), -1.9 as f64);
+ 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);
}
@@ -528,11 +528,11 @@ mod tests {
#[cfg(feature = "num-traits")]
#[test]
fn test_into_isize() {
- assert_eq!(into_isize(&1).unwrap(), 1 as isize);
- assert_eq!(into_isize(&1.9).unwrap(), 1 as isize);
- assert_eq!(into_isize(&-1.9).unwrap(), -1 as isize);
- assert_eq!(into_isize(&(1.5 as f64)).unwrap(), 1 as isize);
- assert_eq!(into_isize(&(-1.5 as f64)).unwrap(), -1 as isize);
+ assert_eq!(into_isize(&1).unwrap(), 1_isize);
+ assert_eq!(into_isize(&1.9).unwrap(), 1_isize);
+ 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) {
Err(Fmt(fmt::Error)) => {}
_ => panic!("Should return error of type Err(Fmt(fmt::Error))"),
@@ -580,8 +580,8 @@ mod tests {
assert_eq!(abs(-1).unwrap(), 1);
assert_eq!(abs(1.0).unwrap(), 1.0);
assert_eq!(abs(-1.0).unwrap(), 1.0);
- assert_eq!(abs(1.0 as f64).unwrap(), 1.0 as f64);
- assert_eq!(abs(-1.0 as f64).unwrap(), 1.0 as f64);
+ assert_eq!(abs(1.0_f64).unwrap(), 1.0_f64);
+ assert_eq!(abs(-1.0_f64).unwrap(), 1.0_f64);
}
#[test]