use borsh::{BorshDeserialize, BorshSerialize}; #[allow(unused)] use alloc::{string::String, vec::Vec}; #[cfg(feature = "hashbrown")] use hashbrown::HashMap; #[cfg(hash_collections)] use core::{cmp::Eq, hash::Hash}; #[cfg(feature = "std")] use std::collections::HashMap; use alloc::collections::BTreeMap; /// `T: Ord` bound is required for `BorshDeserialize` derive to be successful #[derive(BorshSerialize, BorshDeserialize, PartialEq, Debug)] enum E { X { f: BTreeMap }, Y(W), } #[cfg(hash_collections)] #[derive(BorshSerialize, BorshDeserialize, Debug)] enum I1 { B { #[allow(unused)] #[borsh(skip)] x: HashMap, y: String, }, C(K, Vec), } #[cfg(hash_collections)] #[derive(BorshSerialize, BorshDeserialize, Debug)] enum I2 { B { x: HashMap, y: String }, C(K, #[borsh(skip)] U), }