Skip to content

Commit

Permalink
Add types with skiped fields to collision test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanikVitek committed Jan 30, 2025
1 parent fd82905 commit 6fa1cc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion borsh/tests/compile_derives/test_generic_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct G1<K, V, U>(#[borsh(skip)] HashMap<K, V>, U);
struct G2<K: Ord + Hash + Eq, R, U>(HashMap<K, R>, #[borsh(skip)] U);

/// implicit derived `core::default::Default` bounds on `K` and `V` are dropped by empty bound
/// specified, as `HashMap` hash its own `Default` implementation
/// specified, as `HashMap` has its own `Default` implementation
#[cfg(hash_collections)]
#[derive(BorshDeserialize)]
struct G3<K, V, U>(#[borsh(skip, bound(deserialize = ""))] HashMap<K, V>, U);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ enum B {
C,
D,
}

#[derive(borsh::BorshSerialize, borsh::BorshDeserialize)]
struct C {
x: u64,
#[borsh(skip)]
y: String,
}

0 comments on commit 6fa1cc4

Please sign in to comment.