mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 17:53:01 +02:00
Use integrated error instead of panic on some legacy codepaths
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
f3dd90df39
commit
732a77f3a8
6 changed files with 49 additions and 89 deletions
|
@ -351,8 +351,7 @@ pub(crate) async fn register_route(
|
|||
if !services.globals.new_user_displayname_suffix().is_empty()
|
||||
&& body.appservice_info.is_none()
|
||||
{
|
||||
write!(displayname, " {}", services.server.config.new_user_displayname_suffix)
|
||||
.expect("should be able to write to string buffer");
|
||||
write!(displayname, " {}", services.server.config.new_user_displayname_suffix)?;
|
||||
}
|
||||
|
||||
services
|
||||
|
@ -370,8 +369,7 @@ pub(crate) async fn register_route(
|
|||
content: ruma::events::push_rules::PushRulesEventContent {
|
||||
global: push::Ruleset::server_default(&user_id),
|
||||
},
|
||||
})
|
||||
.expect("to json always works"),
|
||||
})?,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue