events: Re-enable clippy::needless_borrow lint

It seems false positives have been fixed.
This commit is contained in:
Kévin Commaille 2023-06-16 08:15:43 +02:00 committed by Kévin Commaille
parent f964656a4d
commit af437bc642
2 changed files with 2 additions and 5 deletions

View File

@ -2,9 +2,6 @@
//! //!
//! This module also contains types shared by events in its child namespaces. //! This module also contains types shared by events in its child namespaces.
// https://github.com/rust-lang/rust-clippy/issues/9111
#![allow(clippy::needless_borrow)]
use std::collections::BTreeMap; use std::collections::BTreeMap;
use js_int::UInt; use js_int::UInt;

View File

@ -39,7 +39,7 @@ mod tests {
fn serialization_with_optional_fields_as_none() { fn serialization_with_optional_fields_as_none() {
let content = RoomNameEventContent { name: Some("The room name".to_owned()) }; let content = RoomNameEventContent { name: Some("The room name".to_owned()) };
let actual = to_json_value(&content).unwrap(); let actual = to_json_value(content).unwrap();
let expected = json!({ let expected = json!({
"name": "The room name", "name": "The room name",
}); });
@ -51,7 +51,7 @@ mod tests {
fn serialization_with_all_fields() { fn serialization_with_all_fields() {
let content = RoomNameEventContent { name: Some("The room name".to_owned()) }; let content = RoomNameEventContent { name: Some("The room name".to_owned()) };
let actual = to_json_value(&content).unwrap(); let actual = to_json_value(content).unwrap();
let expected = json!({ let expected = json!({
"name": "The room name", "name": "The room name",
}); });