From d5ce4b316fab06dc2143ebc62db2bcfd083ce4c1 Mon Sep 17 00:00:00 2001 From: dasha_uwu Date: Tue, 9 Sep 2025 18:18:28 +0500 Subject: [PATCH] remove unnecessary as_ref --- src/core/matrix/event/unsigned.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/matrix/event/unsigned.rs b/src/core/matrix/event/unsigned.rs index 42928af4..d66005c9 100644 --- a/src/core/matrix/event/unsigned.rs +++ b/src/core/matrix/event/unsigned.rs @@ -1,5 +1,5 @@ use serde::Deserialize; -use serde_json::value::Value as JsonValue; +use serde_json::value::{RawValue as RawJsonValue, Value as JsonValue}; use super::Event; use crate::{Result, err, is_true}; @@ -43,8 +43,7 @@ where { event .unsigned() - .as_ref() - .map(|raw| raw.get()) + .map(RawJsonValue::get) .map(serde_json::from_str) .ok_or(err!(Request(NotFound("\"unsigned\" property not found in pdu"))))? .map_err(|e| err!(Database("Failed to deserialize \"unsigned\" into value: {e}")))