-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blank and negated + small adjustments #17
Conversation
src/components/duration.rs
Outdated
/// Returns whether the current `Duration` is blank. | ||
pub fn blank(&self) -> bool { | ||
duration_sign(&self.iter().collect()) == 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would probably be better to name this is_zero
, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was more talking about the function itself, since duration_sign
returns zero only when self
is zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I'm blind lol yeah, that can work too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glancing back through old temporal meeting minutes. It used to be called isZero
but was opted off of, but I see no reason to not go with isZero
as long as the equivalency is noted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, blank
is not very descriptive IMHO. We can add some comments when we rename spec methods just like in Boa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related to #11
Primarily implementing
blank
andnegated
functionality onto blank.Renames:
duration_sign
->sign