client-api: Remove Raw nesting
… should be unnecessary.
This commit is contained in:
parent
fab5c9128f
commit
82becb86c8
@ -5,7 +5,6 @@ use std::collections::BTreeMap;
|
|||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_identifiers::RoomId;
|
use ruma_identifiers::RoomId;
|
||||||
use ruma_serde::Raw;
|
|
||||||
|
|
||||||
use super::RoomKeyBackup;
|
use super::RoomKeyBackup;
|
||||||
|
|
||||||
@ -27,7 +26,7 @@ ruma_api! {
|
|||||||
pub version: &'a str,
|
pub version: &'a str,
|
||||||
|
|
||||||
/// A map from room IDs to session IDs to key data.
|
/// A map from room IDs to session IDs to key data.
|
||||||
pub rooms: BTreeMap<Box<RoomId>, Raw<RoomKeyBackup>>,
|
pub rooms: BTreeMap<Box<RoomId>, RoomKeyBackup>,
|
||||||
}
|
}
|
||||||
|
|
||||||
response: {
|
response: {
|
||||||
@ -46,7 +45,7 @@ ruma_api! {
|
|||||||
|
|
||||||
impl<'a> Request<'a> {
|
impl<'a> Request<'a> {
|
||||||
/// Creates a new `Request` with the given version and room key backups.
|
/// Creates a new `Request` with the given version and room key backups.
|
||||||
pub fn new(version: &'a str, rooms: BTreeMap<Box<RoomId>, Raw<RoomKeyBackup>>) -> Self {
|
pub fn new(version: &'a str, rooms: BTreeMap<Box<RoomId>, RoomKeyBackup>) -> Self {
|
||||||
Self { version, rooms }
|
Self { version, rooms }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ use std::collections::BTreeMap;
|
|||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_identifiers::RoomId;
|
use ruma_identifiers::RoomId;
|
||||||
use ruma_serde::Raw;
|
|
||||||
|
|
||||||
use super::RoomKeyBackup;
|
use super::RoomKeyBackup;
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ ruma_api! {
|
|||||||
|
|
||||||
response: {
|
response: {
|
||||||
/// A map from room IDs to session IDs to key data.
|
/// A map from room IDs to session IDs to key data.
|
||||||
pub rooms: BTreeMap<Box<RoomId>, Raw<RoomKeyBackup>>,
|
pub rooms: BTreeMap<Box<RoomId>, RoomKeyBackup>,
|
||||||
}
|
}
|
||||||
|
|
||||||
error: crate::Error
|
error: crate::Error
|
||||||
@ -43,7 +42,7 @@ impl<'a> Request<'a> {
|
|||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given room key backups.
|
/// Creates a new `Response` with the given room key backups.
|
||||||
pub fn new(rooms: BTreeMap<Box<RoomId>, Raw<RoomKeyBackup>>) -> Self {
|
pub fn new(rooms: BTreeMap<Box<RoomId>, RoomKeyBackup>) -> Self {
|
||||||
Self { rooms }
|
Self { rooms }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user