mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free (#8766)
This commit is contained in:
@@ -51,6 +51,6 @@ pub fn (b []byte) bytestr() string {
|
||||
fn bytes2string(b []byte) string {
|
||||
mut copy := b.clone()
|
||||
copy << `\0`
|
||||
res := tos(copy.data, copy.len-1)
|
||||
res := unsafe { tos(copy.data, copy.len-1) }
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user