Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
creativcoder committed Aug 1, 2023
1 parent bb3f0c1 commit b831c43
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions ipld/hamt/src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<K: PartialEq, V: PartialEq, H, Ver> PartialEq for Pointer<K, V, H, Ver> {

mod pointer_v0 {
use cid::Cid;
use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize};
use serde::{Deserialize, Serialize};

use crate::KeyValuePair;

Expand Down Expand Up @@ -172,31 +172,6 @@ where
0 => {
let pointer_de: PointerDe<K, V> = Deserialize::deserialize(deserializer)?;
Ok(Pointer::from(pointer_de))
// let ipld = Ipld::deserialize(deserializer)?;
// let (_key, value) = match ipld {
// Ipld::Map(map) => map
// .into_iter()
// .next()
// .ok_or("Expected at least one element".to_string()),
// other => Err(format!("Expected `Ipld::Map`, got {:#?}", other)),
// }
// .map_err(de::Error::custom)?;
// match value {
// ipld_list @ Ipld::List(_) => {
// let values: Vec<KeyValuePair<K, V>> =
// Deserialize::deserialize(ipld_list).map_err(de::Error::custom)?;
// Ok(Self::Values(values))
// }
// Ipld::Link(cid) => Ok(Self::Link {
// cid,
// cache: Default::default(),
// }),
// other => Err(format!(
// "Expected `Ipld::List` or `Ipld::Link`, got {:#?}",
// other
// )),
// }
// .map_err(de::Error::custom)
}
_ => Ipld::deserialize(deserializer)
.and_then(|ipld| ipld.try_into().map_err(de::Error::custom)),
Expand Down

0 comments on commit b831c43

Please sign in to comment.