mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-28 18:58:30 +00:00
resolve almost all as_conversions lints
may need further opinion from others on these Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
f8e1255994
commit
0ebb323490
18 changed files with 144 additions and 85 deletions
|
@ -63,8 +63,8 @@ pub(crate) async fn get_context_route(body: Ruma<get_context::v3::Request>) -> R
|
|||
lazy_loaded.insert(base_event.sender.as_str().to_owned());
|
||||
}
|
||||
|
||||
// Use limit with maximum 100
|
||||
let limit = u64::from(body.limit).min(100) as usize;
|
||||
// Use limit or else 10, with maximum 100
|
||||
let limit = usize::try_from(body.limit).unwrap_or(10).min(100);
|
||||
|
||||
let base_event = base_event.to_room_event();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue