Skip to content

Commit

Permalink
zig- db.Remote.type didn't need to be quoted
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Oct 17, 2021
1 parent 2c46eb0 commit f5e8c56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/db/Remote.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const db = &_internal.db;
pub const Remote = struct {
id: u64,
uuid: ulid.ULID,
@"type": Type,
type: Type,
domain: string,

pub const table_name = "remotes";
Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn pek_fix_date(alloc: *std.mem.Allocator, in: string) !string {
}

pub fn pek_tree_url(alloc: *std.mem.Allocator, remo: db.Remote, repo: string, commit: string) !string {
return switch (remo.@"type") {
return switch (remo.type) {
.github => try std.fmt.allocPrint(alloc, "https://github.com/{s}/tree/{s}", .{ repo, commit }),
};
}
Expand Down

0 comments on commit f5e8c56

Please sign in to comment.