rename RumaResponse to Ra

It's very commonly used so having a short name is worthwhile, I think.
This commit is contained in:
Charles Hall 2024-05-18 18:59:46 -07:00
parent 230ebd3884
commit 7ea98dac72
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
38 changed files with 332 additions and 351 deletions

View file

@ -4,7 +4,7 @@ use ruma::api::client::discovery::get_capabilities::{
self, Capabilities, RoomVersionStability, RoomVersionsCapability,
};
use crate::{services, Result, Ruma, RumaResponse};
use crate::{services, Ra, Result, Ruma};
/// # `GET /_matrix/client/r0/capabilities`
///
@ -12,7 +12,7 @@ use crate::{services, Result, Ruma, RumaResponse};
/// of this server.
pub(crate) async fn get_capabilities_route(
_body: Ruma<get_capabilities::v3::Request>,
) -> Result<RumaResponse<get_capabilities::v3::Response>> {
) -> Result<Ra<get_capabilities::v3::Response>> {
let mut available = BTreeMap::new();
for room_version in &services().globals.unstable_room_versions {
available.insert(room_version.clone(), RoomVersionStability::Unstable);
@ -27,7 +27,7 @@ pub(crate) async fn get_capabilities_route(
available,
};
Ok(RumaResponse(get_capabilities::v3::Response {
Ok(Ra(get_capabilities::v3::Response {
capabilities,
}))
}