Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Feb 7, 2024
1 parent 9865b7c commit 41906e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions primitives/src/communities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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 }
)
}
Expand Down
1 change: 0 additions & 1 deletion primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with Encointer. If not, see <http://www.gnu.org/licenses/>.

#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(test, feature(assert_matches))]

pub mod balances;
pub mod bazaar;
Expand Down

0 comments on commit 41906e9

Please sign in to comment.