Skip to content

Commit

Permalink
zeit: use inferred enum values, rename equal to eql
Browse files Browse the repository at this point in the history
  • Loading branch information
vascocosta authored and rockorager committed Sep 3, 2024
1 parent a82f140 commit a25dc24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zeit.zig
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,11 @@ pub const Time = struct {
const time_instant = time.instant();

if (self_instant.timestamp > time_instant.timestamp) {
return TimeComparison.after;
return .after;
} else if (self_instant.timestamp < time_instant.timestamp) {
return TimeComparison.before;
return .before;
} else {
return TimeComparison.equal;
return .equal;
}
}

Expand All @@ -846,7 +846,7 @@ pub const Time = struct {
return self_instant.timestamp < time_instant.timestamp;
}

pub fn equal(self: Time, time: Time) bool {
pub fn eql(self: Time, time: Time) bool {
const self_instant = self.instant();
const time_instant = time.instant();
return self_instant.timestamp == time_instant.timestamp;
Expand Down

0 comments on commit a25dc24

Please sign in to comment.