Skip to content

Commit

Permalink
fix: duplicate struct field
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Sep 19, 2024
1 parent f90d9ee commit bacb9b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Memory = @import("Memory.zig");

pub const HttpResponse = struct {
memory: Memory,
status: u16,
statusCode: u16,

/// IMPORTANT: it's the caller's responsibility to free the returned string
pub fn body(self: HttpResponse, allocator: std.mem.Allocator) ![]u8 {
Expand All @@ -18,7 +18,7 @@ pub const HttpResponse = struct {
}

pub fn status(self: HttpResponse) u16 {
return self.status;
return self.statusCode;
}
};

Expand Down

0 comments on commit bacb9b4

Please sign in to comment.