From 69bece2a40404d213686099644113085b595f1ad Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 31 Mar 2021 13:26:47 +0200 Subject: [PATCH] events: Fix construction of non-exhaustive struct in tests --- ruma-events/src/room/power_levels.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruma-events/src/room/power_levels.rs b/ruma-events/src/room/power_levels.rs index 196e1d83..4e55061f 100644 --- a/ruma-events/src/room/power_levels.rs +++ b/ruma-events/src/room/power_levels.rs @@ -121,6 +121,7 @@ mod tests { time::{Duration, UNIX_EPOCH}, }; + use assign::assign; use js_int::int; use maplit::btreemap; use ruma_identifiers::{event_id, room_id, user_id}; @@ -187,7 +188,7 @@ mod tests { user.clone() => int!(23) }, users_default: int!(23), - notifications: NotificationPowerLevels { room: int!(23) }, + notifications: assign!(NotificationPowerLevels::new(), { room: int!(23) }), }, event_id: event_id!("$h29iv0s8:example.com"), origin_server_ts: UNIX_EPOCH + Duration::from_millis(1), @@ -206,7 +207,7 @@ mod tests { user.clone() => int!(42) }, users_default: int!(42), - notifications: NotificationPowerLevels { room: int!(42) }, + notifications: assign!(NotificationPowerLevels::new(), { room: int!(42) }), }), room_id: room_id!("!n8f893n9:example.com"), unsigned: Unsigned { age: Some(int!(100)), ..Unsigned::default() },