Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmth committed Feb 4, 2024
1 parent ddcc72a commit 38777ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl TryFrom<Value> for SdObjectEncoder {
impl<H: Hasher> SdObjectEncoder<H> {
/// Creates a new [`SdObjectEncoder`] with custom hash function to create digests.
pub fn with_custom_hasher(object: &str, hasher: H) -> Result<Self> {
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()));
}
Expand Down Expand Up @@ -129,7 +129,7 @@ impl<H: Hasher> SdObjectEncoder<H> {
/// 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.
Expand Down

0 comments on commit 38777ca

Please sign in to comment.