Use struct literals for consistency

This commit is contained in:
Jonas Platte 2022-01-13 11:48:18 +01:00
parent 349865d3cc
commit cf54185a1c
No known key found for this signature in database
GPG key ID: CC154DE0E30B7C67
3 changed files with 29 additions and 27 deletions

View file

@ -17,11 +17,10 @@ use rocket::get;
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/versions"))]
#[tracing::instrument]
pub async fn get_supported_versions_route() -> ConduitResult<get_supported_versions::Response> {
let mut resp =
get_supported_versions::Response::new(vec!["r0.5.0".to_owned(), "r0.6.0".to_owned()]);
resp.unstable_features
.insert("org.matrix.e2e_cross_signing".to_owned(), true);
let resp = get_supported_versions::Response {
versions: vec!["r0.5.0".to_owned(), "r0.6.0".to_owned()],
unstable_features: [("org.matrix.e2e_cross_signing".to_owned(), true)].into(),
};
Ok(resp.into())
}