From db2b29ff992ce311d43dc4196190dfe7393d9d7b Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Sun, 7 Jul 2024 17:11:22 +0200 Subject: [PATCH] Make test compliant with new country_id method --- src/phone_number.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/phone_number.rs b/src/phone_number.rs index 8907324..418cf99 100644 --- a/src/phone_number.rs +++ b/src/phone_number.rs @@ -299,7 +299,10 @@ mod test { #[case] country: Option, #[case] _type: Type, ) -> anyhow::Result<()> { - assert_eq!(country, number.country().id()); + // Flatten the error into an Option. + // XXX: We can't currently distinguish an error case from an unavailable case, given the + // current phone number list in rstest above. + assert_eq!(country, number.country().id().ok().flatten()); Ok(()) }