-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Question] Would it be possible to make ulid::Generator::new()
const?
#83
Comments
Looks like that would be an easy change. Feel free to send a patch
…On Thu, Oct 24, 2024, 10:48 AM emkw ***@***.***> wrote:
Would it be possible to make ulid::Generator::new() const?
That could be used to statically initialize it, so it wouldn't require
lazy initialization.
—
Reply to this email directly, view it on GitHub
<#83>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOAOYZRPRGL3NUTPOCX5BDZ5EXIJAVCNFSM6AAAAABQRTXWCKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYTEMRSGY2DCNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Just to make sure - aren't there any future assumptions about generator initialization that |
I doubt. The only thing that would be non-const would the RNG but that's being passed to generate with the current API. |
emkw
added a commit
to emkw/ulid-rs
that referenced
this issue
Oct 24, 2024
This allows static generator initialization - dylanhart#83
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would it be possible to make
ulid::Generator::new()
const?That could be used to statically initialize it, so it wouldn't require lazy initialization.
The text was updated successfully, but these errors were encountered: