From 41906e91e1d1ced6066f94b8933e86b18a2702e1 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 7 Feb 2024 11:40:51 +0100 Subject: [PATCH] fix tests --- primitives/src/communities.rs | 6 +++--- primitives/src/lib.rs | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/primitives/src/communities.rs b/primitives/src/communities.rs index 936a5a5e..058b27f5 100644 --- a/primitives/src/communities.rs +++ b/primitives/src/communities.rs @@ -424,8 +424,8 @@ mod tests { Degree, Demurrage, Location, PalletString, RangeError, }, }; + use frame_support::assert_err; use sp_std::str::FromStr; - use std::assert_matches::assert_matches; #[test] fn demurrage_smaller_0_fails() { @@ -509,8 +509,8 @@ mod tests { #[test] fn invalid_cid_from_str_errs() { - assert_matches!( - CommunityIdentifier::from_str("gbsuv7YXq9l").unwrap_err(), + assert_err!( + CommunityIdentifier::from_str("gbsuv7YXq9l"), bs58::decode::Error::InvalidCharacter { character: 'l', index: 10 } ) } diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 6984cf25..687c38c9 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -15,7 +15,6 @@ // along with Encointer. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(test, feature(assert_matches))] pub mod balances; pub mod bazaar;