Co-authored-by: cui <523516579@qq.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
fa8ea23056
commit
ea4408c405
@ -43,6 +43,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
|
||||
### Improvements
|
||||
|
||||
* (client) [#21436](https://github.com/cosmos/cosmos-sdk/pull/21436) Use `address.Codec` from client.Context in `tx.Sign`.
|
||||
* (internal) [#21412](https://github.com/cosmos/cosmos-sdk/pull/21412) Using unsafe.String and unsafe.SliceData.
|
||||
|
||||
### API Breaking Changes
|
||||
|
||||
|
||||
@ -15,5 +15,5 @@ func UnsafeStrToBytes(s string) []byte {
|
||||
// to be used generally, but for a specific pattern to delete keys
|
||||
// from a map.
|
||||
func UnsafeBytesToStr(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
|
||||
@ -13,5 +13,5 @@ func UnsafeStrToBytes(s string) []byte {
|
||||
// to be used generally, but for a specific pattern to delete keys
|
||||
// from a map.
|
||||
func UnsafeBytesToStr(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
|
||||
@ -15,5 +15,5 @@ func UnsafeStrToBytes(s string) []byte {
|
||||
// to be used generally, but for a specific pattern to delete keys
|
||||
// from a map.
|
||||
func UnsafeBytesToStr(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user