Use struct literals for consistency
This commit is contained in:
parent
349865d3cc
commit
cf54185a1c
3 changed files with 29 additions and 27 deletions
|
@ -159,11 +159,12 @@ pub async fn get_message_events_route(
|
|||
.map(|(_, pdu)| pdu.to_room_event())
|
||||
.collect();
|
||||
|
||||
let mut resp = get_message_events::Response::new();
|
||||
resp.start = body.from.to_owned();
|
||||
resp.end = end_token;
|
||||
resp.chunk = events_after;
|
||||
resp.state = Vec::new();
|
||||
let resp = get_message_events::Response {
|
||||
start: body.from.to_owned(),
|
||||
end: end_token,
|
||||
chunk: events_after,
|
||||
state: Vec::new(),
|
||||
};
|
||||
|
||||
Ok(resp.into())
|
||||
}
|
||||
|
@ -189,11 +190,12 @@ pub async fn get_message_events_route(
|
|||
.map(|(_, pdu)| pdu.to_room_event())
|
||||
.collect();
|
||||
|
||||
let mut resp = get_message_events::Response::new();
|
||||
resp.start = body.from.to_owned();
|
||||
resp.end = start_token;
|
||||
resp.chunk = events_before;
|
||||
resp.state = Vec::new();
|
||||
let resp = get_message_events::Response {
|
||||
start: body.from.to_owned(),
|
||||
end: start_token,
|
||||
chunk: events_before,
|
||||
state: Vec::new(),
|
||||
};
|
||||
|
||||
Ok(resp.into())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue