enable enum_variant_names lint

This commit is contained in:
Charles Hall 2024-05-01 22:36:15 -07:00
parent 2ff08c9fc4
commit bc2f7c6826
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 16 additions and 19 deletions

View file

@ -61,7 +61,7 @@ impl PduEvent {
let mut content = serde_json::from_str(self.content.get())
.map_err(|_| Error::bad_database("PDU in db has invalid content."))?;
redact_content_in_place(&mut content, &room_version_id, self.kind.to_string())
.map_err(|e| Error::RedactionError(self.sender.server_name().to_owned(), e))?;
.map_err(|e| Error::Redaction(self.sender.server_name().to_owned(), e))?;
self.unsigned = Some(to_raw_value(&json!({
"redacted_because": serde_json::to_value(reason).expect("to_value(PduEvent) always works")