Skip to content

Commit

Permalink
object: clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
slimsag committed Nov 28, 2024
1 parent 314b761 commit a43ffca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/module.zig
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ pub fn Objects(options: ObjectsOptions, comptime T: type) type {
return unpacked;
}

/// Returns true if the field has an `updated` bit set in internal, after setting the bit
/// back to false.
/// If options have tracking enabled, this returns true when the given field has been set using the set()
/// or setAll() methods. A subsequent call to .updated() will return false until another set() or setAll()
/// call is made.
pub fn updated(objs: *@This(), id: ObjectID, field_name: anytype) bool {
if (options.track_fields) {
const unpacked = objs.validateAndUnpack(id, "updated");
Expand Down

0 comments on commit a43ffca

Please sign in to comment.