client-api: Remove Raw nesting

… should be unnecessary.
This commit is contained in:
Jonas Platte 2022-01-27 16:16:23 +01:00
parent fab5c9128f
commit 82becb86c8
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
2 changed files with 4 additions and 6 deletions

View File

@ -5,7 +5,6 @@ use std::collections::BTreeMap;
use js_int::UInt;
use ruma_api::ruma_api;
use ruma_identifiers::RoomId;
use ruma_serde::Raw;
use super::RoomKeyBackup;
@ -27,7 +26,7 @@ ruma_api! {
pub version: &'a str,
/// 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: {
@ -46,7 +45,7 @@ ruma_api! {
impl<'a> Request<'a> {
/// 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 }
}
}

View File

@ -4,7 +4,6 @@ use std::collections::BTreeMap;
use ruma_api::ruma_api;
use ruma_identifiers::RoomId;
use ruma_serde::Raw;
use super::RoomKeyBackup;
@ -28,7 +27,7 @@ ruma_api! {
response: {
/// 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
@ -43,7 +42,7 @@ impl<'a> Request<'a> {
impl Response {
/// 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 }
}
}