PR feedback

Remove `anyerror` from example definitions - we only need this in the
struct definition, no need to have explicit error set defined in
user-defined view functions.
This commit is contained in:
Bob Farrell 2024-02-17 15:35:40 +00:00
parent 8ac2afbec2
commit d52aed8a9b
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ const Request = jetzig.http.Request;
const Data = jetzig.data.Data;
const View = jetzig.views.View;
pub fn get(id: []const u8, request: *Request, data: *Data) anyerror!View {
pub fn get(id: []const u8, request: *Request, data: *Data) !View {
var body = try data.object();
const random_quote = try randomQuote(request.allocator);

View File

@ -1,6 +1,6 @@
const jetzig = @import("jetzig");
pub fn index(request: *jetzig.http.StaticRequest, data: *jetzig.data.Data) anyerror!jetzig.views.View {
pub fn index(request: *jetzig.http.StaticRequest, data: *jetzig.data.Data) !jetzig.views.View {
_ = data;
return request.render(.ok);
}