From 651f1b99c51659fa5077b60feb75aec4e6ff7e27 Mon Sep 17 00:00:00 2001 From: Condorra Date: Mon, 11 Mar 2024 21:15:52 +1100 Subject: [PATCH] Fix build of tests --- .../message_handler/user_commands/allow.rs | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/blastmud_game/src/message_handler/user_commands/allow.rs b/blastmud_game/src/message_handler/user_commands/allow.rs index 1f12633..c07c22c 100644 --- a/blastmud_game/src/message_handler/user_commands/allow.rs +++ b/blastmud_game/src/message_handler/user_commands/allow.rs @@ -577,8 +577,9 @@ mod tests { &ConsentDetails::default_for(&ConsentType::Fight), &None, &Some(Consent { - expires: Some(chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7)) - .unwrap(), + expires: Some( + chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent::default()), ..Consent::default() }), @@ -608,8 +609,9 @@ mod tests { ..ConsentDetails::default_for(&ConsentType::Fight) }, &Some(Consent { - expires: Some(chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7)) - .unwrap(), + expires: Some( + chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent { status: ConsentStatus::Active, ..FightConsent::default() @@ -617,8 +619,9 @@ mod tests { ..Consent::default() }), &Some(Consent { - expires: Some(chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7)) - .unwrap(), + expires: Some( + chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent { status: ConsentStatus::Active, ..FightConsent::default() @@ -667,8 +670,9 @@ mod tests { ..ConsentDetails::default_for(&ConsentType::Fight) }, &Some(Consent { - expires: Some(chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7)) - .unwrap(), + expires: Some( + chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent { status: ConsentStatus::Active, ..FightConsent::default() @@ -676,15 +680,16 @@ mod tests { ..Consent::default() }), &Some(Consent { - expires: Some(chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7)) - .unwrap(), + expires: Some( + chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent { status: ConsentStatus::Active, pending_change: Some(Box::new(Consent { expires: Some( - chrono::Utc::now() + chrono::TimeDelta::try_minutes(60 * 24 * 7), - ) - .unwrap(), + chrono::Utc::now() + + chrono::TimeDelta::try_minutes(60 * 24 * 7).unwrap(), + ), fight_consent: Some(FightConsent { freely_revoke: true, ..FightConsent::default()