use * for pointer type instead of &
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
This commit is contained in:
@@ -196,7 +196,7 @@ pub const Utf8View = struct {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn iterator(s: &const Utf8View) Utf8Iterator {
|
||||
pub fn iterator(s: *const Utf8View) Utf8Iterator {
|
||||
return Utf8Iterator{
|
||||
.bytes = s.bytes,
|
||||
.i = 0,
|
||||
@@ -208,7 +208,7 @@ const Utf8Iterator = struct {
|
||||
bytes: []const u8,
|
||||
i: usize,
|
||||
|
||||
pub fn nextCodepointSlice(it: &Utf8Iterator) ?[]const u8 {
|
||||
pub fn nextCodepointSlice(it: *Utf8Iterator) ?[]const u8 {
|
||||
if (it.i >= it.bytes.len) {
|
||||
return null;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ const Utf8Iterator = struct {
|
||||
return it.bytes[it.i - cp_len .. it.i];
|
||||
}
|
||||
|
||||
pub fn nextCodepoint(it: &Utf8Iterator) ?u32 {
|
||||
pub fn nextCodepoint(it: *Utf8Iterator) ?u32 {
|
||||
const slice = it.nextCodepointSlice() ?? return null;
|
||||
|
||||
switch (slice.len) {
|
||||
|
||||
Reference in New Issue
Block a user