mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
Update bytes.go
This commit is contained in:
parent
3b17e78274
commit
4ebef16b7a
1 changed files with 1 additions and 7 deletions
|
|
@ -38,13 +38,7 @@ func FromHex(s string) []byte {
|
|||
|
||||
// CopyBytes returns an exact copy of the provided bytes.
|
||||
func CopyBytes(b []byte) (copiedBytes []byte) {
|
||||
if b == nil {
|
||||
return nil
|
||||
}
|
||||
copiedBytes = make([]byte, len(b))
|
||||
copy(copiedBytes, b)
|
||||
|
||||
return
|
||||
return bytes.Clone(b)
|
||||
}
|
||||
|
||||
// has0xPrefix validates str begins with '0x' or '0X'.
|
||||
|
|
|
|||
Loading…
Reference in a new issue