Conditionally emit rocket::http_verb attr macros if lib/bin

This commit is contained in:
Devin Ragotzy 2020-07-25 23:08:00 -04:00 committed by timokoesters
parent b82fd02ee3
commit 42e0102a2a
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
8 changed files with 453 additions and 170 deletions

View file

@ -1,4 +1,3 @@
use js_int::uint;
use ruma::{
push::{
Action, ConditionalPushRule, ConditionalPushRuleInit, PatternedPushRule,
@ -185,7 +184,7 @@ pub fn encrypted_room_one_to_one_rule() -> ConditionalPushRule {
rule_id: ".m.rule.encrypted_room_one_to_one".to_owned(),
conditions: vec![
PushCondition::RoomMemberCount {
is: RoomMemberCountIs::from(uint!(2)..),
is: RoomMemberCountIs::from(2_u32.into()..),
},
PushCondition::EventMatch {
key: "type".to_owned(),
@ -208,7 +207,7 @@ pub fn room_one_to_one_rule() -> ConditionalPushRule {
rule_id: ".m.rule.room_one_to_one".to_owned(),
conditions: vec![
PushCondition::RoomMemberCount {
is: RoomMemberCountIs::from(uint!(2)..),
is: RoomMemberCountIs::from(2_u32.into()..),
},
PushCondition::EventMatch {
key: "type".to_owned(),