remove unnecessary as_ref
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde_json::value::Value as JsonValue;
|
use serde_json::value::{RawValue as RawJsonValue, Value as JsonValue};
|
||||||
|
|
||||||
use super::Event;
|
use super::Event;
|
||||||
use crate::{Result, err, is_true};
|
use crate::{Result, err, is_true};
|
||||||
@@ -43,8 +43,7 @@ where
|
|||||||
{
|
{
|
||||||
event
|
event
|
||||||
.unsigned()
|
.unsigned()
|
||||||
.as_ref()
|
.map(RawJsonValue::get)
|
||||||
.map(|raw| raw.get())
|
|
||||||
.map(serde_json::from_str)
|
.map(serde_json::from_str)
|
||||||
.ok_or(err!(Request(NotFound("\"unsigned\" property not found in pdu"))))?
|
.ok_or(err!(Request(NotFound("\"unsigned\" property not found in pdu"))))?
|
||||||
.map_err(|e| err!(Database("Failed to deserialize \"unsigned\" into value: {e}")))
|
.map_err(|e| err!(Database("Failed to deserialize \"unsigned\" into value: {e}")))
|
||||||
|
|||||||
Reference in New Issue
Block a user