Skip to content

Commit

Permalink
fix: add try to uri parse in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
weskoerber committed Feb 10, 2024
1 parent f12bced commit da5e60b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A simple query string parser for zig.
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer if (gpa.deinit() != .ok) @panic("leak");

const uri = std.Uri.parse("https://example.com?hello=world");
const uri = try std.Uri.parse("https://example.com?hello=world");

const query_params = try kewpie.parse(gpa.allocator(), uri);
defer query_params.deinit();
Expand All @@ -57,7 +57,7 @@ A simple query string parser for zig.
const kewpie = @import("kewpie");

pub fn main() !void {
const uri = std.Uri.parse("https://example.com?hello=world");
const uri = try std.Uri.parse("https://example.com?hello=world");

var query_params = try kewpie.iter(uri);
while (query_params.next()) |param| {
Expand Down

0 comments on commit da5e60b

Please sign in to comment.