fix needless pass by value

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-28 23:23:59 +00:00
parent 875d9e8b07
commit 57acc4f655
15 changed files with 40 additions and 42 deletions

View file

@ -17,7 +17,7 @@ impl Data {
}
/// Registers an appservice and returns the ID to the caller
pub(super) fn register_appservice(&self, yaml: Registration) -> Result<String> {
pub(super) fn register_appservice(&self, yaml: &Registration) -> Result<String> {
let id = yaml.id.as_str();
self.id_appserviceregistrations
.insert(id.as_bytes(), serde_yaml::to_string(&yaml).unwrap().as_bytes())?;

View file

@ -149,7 +149,7 @@ impl Service {
.await
.insert(yaml.id.clone(), yaml.clone().try_into()?);
self.db.register_appservice(yaml)
self.db.register_appservice(&yaml)
}
/// Remove an appservice registration