use stdlib functions instead of intrinsics

This commit is contained in:
Folkert 2023-10-08 22:32:26 +02:00
parent be81651299
commit ef64e37b9b
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -266,8 +266,8 @@ pub const RocStr = extern struct {
const source_ptr = self.asU8ptr();
const dest_ptr = result.asU8ptrMut();
@memcpy(dest_ptr, source_ptr, old_length);
@memset(dest_ptr + old_length, 0, delta_length);
std.mem.copy(u8, dest_ptr[0..old_length], source_ptr[0..old_length]);
std.mem.set(u8, dest_ptr[old_length .. old_length + delta_length], 0);
self.decref();