mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: bring back panic(err.msg)
-> panic(err)
(#9022)
This commit is contained in:
parent
ce115dcbe0
commit
b712af56fd
110 changed files with 383 additions and 387 deletions
|
@ -110,7 +110,7 @@ pub fn (mut d Digest) checksum() []byte {
|
|||
tmp[0] = 0x80
|
||||
pad := ((55 - d.len) % 64) // calculate number of padding bytes
|
||||
binary.little_endian_put_u64(mut tmp[1 + pad..], d.len << 3) // append length in bits
|
||||
d.write(tmp[..1 + pad + 8]) or { panic(err.msg) }
|
||||
d.write(tmp[..1 + pad + 8]) or { panic(err) }
|
||||
// The previous write ensures that a whole number of
|
||||
// blocks (i.e. a multiple of 64 bytes) have been hashed.
|
||||
if d.nx != 0 {
|
||||
|
@ -127,7 +127,7 @@ pub fn (mut d Digest) checksum() []byte {
|
|||
// sum returns the MD5 checksum of the data.
|
||||
pub fn sum(data []byte) []byte {
|
||||
mut d := new()
|
||||
d.write(data) or { panic(err.msg) }
|
||||
d.write(data) or { panic(err) }
|
||||
return d.checksum()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue