diff --git a/src/encoder.rs b/src/encoder.rs index b6fd2a4..842f22d 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -94,7 +94,7 @@ impl TryFrom for SdObjectEncoder { impl SdObjectEncoder { /// Creates a new [`SdObjectEncoder`] with custom hash function to create digests. pub fn with_custom_hasher(object: &str, hasher: H) -> Result { - let object: Value = serde_json::to_value(&object).map_err(|e| Error::DeserializationError(e.to_string()))?; + let object: Value = serde_json::to_value(object).map_err(|e| Error::DeserializationError(e.to_string()))?; if !object.is_object() { return Err(Error::DataTypeMismatch("expected object".to_owned())); } @@ -129,7 +129,7 @@ impl SdObjectEncoder { /// encoder.conceal("/claim1/abc", None).unwrap(); //"abc": true /// encoder.conceal("/claim2/0", None).unwrap(); //conceals "val_1" /// ``` - /// + /// /// ## Error /// * [`Error::InvalidPath`] if pointer is invalid. /// * [`Error::DataTypeMismatch`] if existing SD format is invalid.