Skip to content

Commit

Permalink
use newer borsh in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Sep 24, 2024
1 parent 62e8ee9 commit 680cafd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/serialize-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ solana-sanitize = { workspace = true }

[dev-dependencies]
bincode = { workspace = true }
borsh0-10 = { workspace = true }
borsh = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
solana-pubkey = { workspace = true, default-features = false, features = [
Expand Down
4 changes: 2 additions & 2 deletions sdk/serialize-utils/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ mod test {
test_read(read_bool, true);
}

fn test_read<T: Debug + PartialEq + serde::Serialize + borsh0_10::BorshSerialize>(
fn test_read<T: Debug + PartialEq + serde::Serialize + borsh::BorshSerialize>(
reader: fn(&mut Cursor<Vec<u8>>) -> Result<T, InstructionError>,
test_value: T,
) {
let bincode_bytes = bincode::serialize(&test_value).unwrap();
let mut cursor = Cursor::new(bincode_bytes);
let bincode_read = reader(&mut cursor).unwrap();

let borsh_bytes = borsh0_10::to_vec(&test_value).unwrap();
let borsh_bytes = borsh::to_vec(&test_value).unwrap();
let mut cursor = Cursor::new(borsh_bytes);
let borsh_read = reader(&mut cursor).unwrap();

Expand Down

0 comments on commit 680cafd

Please sign in to comment.