Skip to content

Commit

Permalink
Upstream 0.22.1 (#124)
Browse files Browse the repository at this point in the history
* added From<TonHash> for  [u8; TON_HASH_LEN]
  • Loading branch information
dbaranovstonfi authored Dec 9, 2024
1 parent 819dcfb commit 4fe1795
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@
* Ni: added into_single_root method
* Ni: bump thiserror dependency version
* Iml #be-1761: fix memory leak in emulator
### v0.22.1
* added From<TonHash> for [u8; TON_HASH_LEN]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resolver = "2"


[workspace.package]
version = "0.22.0"
version = "0.22.1"
edition = "2021"
description = "Rust SDK for The Open Network"
license = "MIT"
Expand Down
6 changes: 6 additions & 0 deletions core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ impl From<[u8; TON_HASH_LEN]> for TonHash {
}
}

impl From<TonHash> for [u8; TON_HASH_LEN] {
fn from(arr: TonHash) -> [u8; TON_HASH_LEN] {
arr.0
}
}

impl From<&[u8; 32]> for TonHash {
fn from(slice: &[u8; 32]) -> Self {
TonHash(*slice)
Expand Down

0 comments on commit 4fe1795

Please sign in to comment.