authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-22 18:20:03 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-22 18:20:03 -07:00
log9bf4680bdb381cebe368abce88a68a116cbc2a89
tree77152b39f472bd75069b7fa7e6b606ee021dfd48
parentfc9e183583dd6299cb4294ecad8739ebbfecb1d0

remove unneeded type alias for string slice


1 files changed, 2 insertions(+), 4 deletions(-)

src/util/yaml.zig+2-4
...@@ -10,8 +10,6 @@ const u = @import("./index.zig");...@@ -10,8 +10,6 @@ const u = @import("./index.zig");
10//10//
11//11//
1212
13const Array = []const string;
14
15pub const Stream = struct {13pub const Stream = struct {
16 docs: []const Document,14 docs: []const Document,
17};15};
...@@ -187,7 +185,7 @@ pub fn parse(alloc: *std.mem.Allocator, input: string) !Document {...@@ -187,7 +185,7 @@ pub fn parse(alloc: *std.mem.Allocator, input: string) !Document {
187pub const Parser = struct {185pub const Parser = struct {
188 alloc: *std.mem.Allocator,186 alloc: *std.mem.Allocator,
189 tokens: TokenList,187 tokens: TokenList,
190 lines: Array,188 lines: []const string,
191 index: usize,189 index: usize,
192190
193 pub fn parse(self: *Parser) !Stream {191 pub fn parse(self: *Parser) !Stream {
...@@ -292,7 +290,7 @@ fn parse_sequence(p: *Parser) Error!Sequence {...@@ -292,7 +290,7 @@ fn parse_sequence(p: *Parser) Error!Sequence {
292 }290 }
293}291}
294292
295fn get_event_string(event: Token, lines: Array) string {293fn get_event_string(event: Token, lines: []const string) string {
296 const sm = event.start_mark;294 const sm = event.start_mark;
297 const em = event.end_mark;295 const em = event.end_mark;
298 return lines[sm.line][sm.column..em.column];296 return lines[sm.line][sm.column..em.column];