From 2bb118fce16f2d5a1a85fce96d228acc23df827e Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Sun, 7 Apr 2024 15:23:28 -0500 Subject: Fix MSRV (#99) * Remove `then_some` to stay compatible with earlier versions of Rust * Fix CI builds to build on old versions of Rust * Trying 1.61 --- tests/test_warp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test_warp.rs') diff --git a/tests/test_warp.rs b/tests/test_warp.rs index 76bfd80..ca56ded 100644 --- a/tests/test_warp.rs +++ b/tests/test_warp.rs @@ -17,7 +17,7 @@ where S: std::str::FromStr, { let s = <&str as serde::Deserialize>::deserialize(deserializer)?; - S::from_str(&s).map_err(|_| D::Error::custom("could not parse string")) + S::from_str(s).map_err(|_| D::Error::custom("could not parse string")) } #[derive(Deserialize, Serialize, Debug, PartialEq)] @@ -65,7 +65,7 @@ fn test_composite_querystring_extractor() { assert_eq!(s.bars, vec![0, 1]); assert_eq!(s.common.limit, 100); assert_eq!(s.common.offset, 50); - assert_eq!(s.common.remaining, true); + assert!(s.common.remaining); }) } @@ -99,6 +99,6 @@ fn test_custom_qs_config() { assert_eq!(s.bars, vec![3]); assert_eq!(s.common.limit, 100); assert_eq!(s.common.offset, 50); - assert_eq!(s.common.remaining, true); + assert!(s.common.remaining); }) } -- cgit v1.2.3