Refactor CidVariant to use naming convention SmallCid and hide enum details from users.
"Also, I think this is the layout we want:
/// Save space on common CID types
pub struct SmallCid(SmallCidInner);
impl SmallCid {
pub fn cid(&self) -> Cid { ... }
}
impl From<Cid> for SmallCid { ... }
impl From<SmallCid> for Cid { ... }
impl PartialEq<Cid> for SmallCid { ... }
enum SmallCidInner {
DagCborV1([u8; 32]),
Heap(Box<Cid>)
}
Users shouldn't be able to see the enum variant"
Originally posted by @aatifsyed in #3275 (comment)
Refactor
CidVariantto use naming conventionSmallCidand hide enum details from users."Also, I think this is the layout we want:
Users shouldn't be able to see the enum variant"
Originally posted by @aatifsyed in #3275 (comment)