Skip to content
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

Mark constructors for Time, Vector2, Vector3 as const #232

Closed
Kolsky opened this issue Dec 11, 2020 · 3 comments
Closed

Mark constructors for Time, Vector2, Vector3 as const #232

Kolsky opened this issue Dec 11, 2020 · 3 comments

Comments

@Kolsky
Copy link

Kolsky commented Dec 11, 2020

No description provided.

@crumblingstatue
Copy link
Collaborator

Vector2 and Vector3 new methods are already const on git master.
Time is more difficult because it's an opaque type and the constructors call into FFI.

@crumblingstatue
Copy link
Collaborator

Time::microseconds and Time::milliseconds are const fn, but making Time::seconds const fn isn't possible right now, because of rust-lang/rust#57241

@crumblingstatue
Copy link
Collaborator

I think these are now as reasonably const as possible, so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants