style: Resolve clippy warnings in database and service

This commit is contained in:
Jade Ellis committed 2026-10-07 00:17:35 +01:00
1 parent 30508ea353
commit c3ba97adb6
2 files changed
+4 -7

No files matched your search

+2 -2
View File
@@ -192,13 +192,13 @@ impl<W: Write> ser::Serializer for &mut Serializer<'_, W> {
);
match name {
| "Json" => serde_json::to_writer(&mut self.out, value).map_err(Into::into),
| "Json" => serde_json::to_writer(&mut *self.out, value).map_err(Into::into),
| "Cbor" => {
use minicbor::encode::write::Writer;
use minicbor_serde::Serializer;
value
.serialize(&mut Serializer::new(&mut Writer::new(&mut self.out)))
.serialize(&mut Serializer::new(&mut Writer::new(&mut *self.out)))
.map_err(|e| Self::Error::SerdeSer(e.to_string().into()))
},
| _ => unhandled!("Unrecognized serialization Newtype {name:?}"),
+2 -5
View File
@@ -459,21 +459,18 @@ impl Service {
push_key.to_owned(),
))
.await;
Ok(())
},
| (Some(appservice_id), None, None) => {
self.db
.delete_all_requests_for(&Destination::Appservice(appservice_id.to_owned()))
.await;
Ok(())
},
| _ => {
debug_warn!("cleanup_events called with too many or too few arguments");
Ok(())
},
}
Ok(())
}
fn dispatch(&self, msg: Msg) -> Result {