client-api: Fix warnings when compiling with client and without server feature
This commit is contained in:
parent
dd67745e4d
commit
d25e40764b
@ -7,10 +7,7 @@ pub mod v3 {
|
||||
|
||||
use ruma_common::{
|
||||
api::ruma_api,
|
||||
push::{
|
||||
Action, NewConditionalPushRule, NewPatternedPushRule, NewPushRule, NewSimplePushRule,
|
||||
PushCondition,
|
||||
},
|
||||
push::{Action, NewPushRule, PushCondition},
|
||||
serde::Incoming,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -132,6 +129,10 @@ pub mod v3 {
|
||||
B: AsRef<[u8]>,
|
||||
S: AsRef<str>,
|
||||
{
|
||||
use ruma_common::push::{
|
||||
NewConditionalPushRule, NewPatternedPushRule, NewSimplePushRule,
|
||||
};
|
||||
|
||||
// Exhaustive enum to fail deserialization on unknown variants.
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
@ -143,6 +144,12 @@ pub mod v3 {
|
||||
Content,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct IncomingRequestQuery {
|
||||
before: Option<String>,
|
||||
after: Option<String>,
|
||||
}
|
||||
|
||||
let (scope, kind, rule_id): (RuleScope, RuleKind, String) =
|
||||
serde::Deserialize::deserialize(serde::de::value::SeqDeserializer::<
|
||||
_,
|
||||
@ -197,13 +204,6 @@ pub mod v3 {
|
||||
after: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct IncomingRequestQuery {
|
||||
before: Option<String>,
|
||||
|
||||
after: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(untagged)]
|
||||
enum RequestBody {
|
||||
|
Loading…
x
Reference in New Issue
Block a user