Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Feb 22, 2024
1 parent c919489 commit 0609f98
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/http_params/http_params.zig
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ pub fn main() !void {

// let's get param "one" by name
std.debug.print("\n", .{});
if (r.getParamSlice("one")) |maybe_str| {
std.log.info("Param one = {s}", .{maybe_str});
if (r.getParamSlice("one")) |value| {
std.log.info("Param one = {s}", .{value});
} else {
std.log.info("Param one not found!", .{});
}
Expand Down
1 change: 0 additions & 1 deletion src/request.zig
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ pub const ParamSliceIterator = struct {
amp_it: std.mem.TokenIterator(u8, .scalar),

pub fn init(query: []const u8) @This() {
// const query = r.query orelse "";
return .{
.amp_it = std.mem.tokenizeScalar(u8, query, '&'),
};
Expand Down
1 change: 0 additions & 1 deletion src/tests/test_http_params.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ test "http parameters" {
break :blk null;
};

// paramSlices = zap.Request.ParamSliceIterator.init(r);
paramSlices = r.getParamSlices();
}
};
Expand Down

0 comments on commit 0609f98

Please sign in to comment.