mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Zig fmt
This commit is contained in:
parent
f3d9c2f2bb
commit
2159d94b87
2 changed files with 6 additions and 7 deletions
|
@ -276,7 +276,7 @@ pub const RocStr = extern struct {
|
|||
};
|
||||
|
||||
pub fn init(bytes_ptr: [*]const u8, length: usize) callconv(.C) RocStr {
|
||||
return @call(.{ .modifier = always_inline }, RocStr.init, .{ std.heap.c_allocator, bytes_ptr, length});
|
||||
return @call(.{ .modifier = always_inline }, RocStr.init, .{ std.heap.c_allocator, bytes_ptr, length });
|
||||
}
|
||||
|
||||
// Str.equal
|
||||
|
@ -956,7 +956,7 @@ test "RocStr.joinWith: result is big" {
|
|||
|
||||
pub fn isValidUnicode(ptr: [*]u8, len: usize) callconv(.C) bool {
|
||||
const bytes: []u8 = ptr[0..len];
|
||||
return @call(.{ .modifier = always_inline }, unicode.utf8ValidateSlice, .{ bytes });
|
||||
return @call(.{ .modifier = always_inline }, unicode.utf8ValidateSlice, .{bytes});
|
||||
}
|
||||
|
||||
const Utf8DecodeError = error{
|
||||
|
@ -990,7 +990,6 @@ pub const Utf8ByteProblem = packed enum(u8) {
|
|||
InvalidStartByte = 3,
|
||||
OverlongEncoding = 4,
|
||||
UnexpectedEndOfSequence = 5,
|
||||
|
||||
};
|
||||
pub const ValidateUtf8BytesResult = extern struct {
|
||||
is_ok: bool, byte_index: usize, problem_code: Utf8ByteProblem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue