Fix doc style comment according to Rust; VSCode added line breaks

This commit is contained in:
Torsten Flammiger 2021-12-22 13:09:56 +01:00
parent 7857da8a0b
commit b6c9582cf4
2 changed files with 13 additions and 7 deletions

View file

@ -27,12 +27,14 @@ impl Appservice {
Ok(()) Ok(())
} }
/** /// Remove an appservice registration
* Remove an appservice registration ///
* service_name is the name you send to register the service /// # Arguments
*/ ///
/// * `service_name` - the name you send to register the service previously
pub fn unregister_appservice(&self, service_name: &str) -> Result<()> { pub fn unregister_appservice(&self, service_name: &str) -> Result<()> {
self.id_appserviceregistrations.remove(service_name.as_bytes())?; self.id_appserviceregistrations
.remove(service_name.as_bytes())?;
Ok(()) Ok(())
} }

View file

@ -1530,10 +1530,14 @@ impl Rooms {
} }
"unregister_appservice" => { "unregister_appservice" => {
if args.len() == 1 { if args.len() == 1 {
db.admin.send(AdminCommand::UnregisterAppservice(args[0].to_owned())); db.admin.send(AdminCommand::UnregisterAppservice(
args[0].to_owned(),
));
} else { } else {
db.admin.send(AdminCommand::SendMessage( db.admin.send(AdminCommand::SendMessage(
RoomMessageEventContent::text_plain("Missing appservice identifier"), RoomMessageEventContent::text_plain(
"Missing appservice identifier",
),
)); ));
} }
} }