-
Notifications
You must be signed in to change notification settings - Fork 16
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
Non-mutating Datetime fns take a pointer to self #10
Comments
frmdstryr
added a commit
that referenced
this issue
Jan 26, 2022
Thanks for the report! Updated now. If you see anything else let me know. |
Wow, that was quick @frmdstryr ! I was going to open a PR, but thanks! |
super-minor: maybe the README example should be updated to inline with this change |
frmdstryr
added a commit
that referenced
this issue
Jan 26, 2022
Nice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Member fns of Datetime take pointer type as self but do no mutation. This forces all instances to be declared var and does not allow const Datetime's.
These fns should just take a value type, there's virtually no benefit to passing a pointer to self in these cases; since the size of Datetime is very small, and in many cases the compiler can inline the fns anyway.
Datetime.Delta.totalSeconds
,Dateime.formatHttp
,Datetime.formatHttpBuf
The text was updated successfully, but these errors were encountered: