Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork175
const fn wherever possible#546
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -26,6 +26,7 @@ impl<Data: Debug> Error<Data> { | |||
} | |||
/// Split this error into its inner status and error data | |||
#[allow(clippy::missing_const_for_fn)] |
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.
clippy mistakenly thinks this can be const
Looks like a few of these can't be const yet with our current msrv |
phip1611 commentedNov 14, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I updated the PR. MSRV bump should no longer be required. |
427ae3b
to0086a1d
Compare0086a1d
to878b56c
Compare
This is a follow-up to#545. It adds
const fn
everywhere possible.We need to keep in mind that future refactorings might need to drop the
const
. This is considered fine as we do not require things to beconst
. In our case, it mainly helps to know if there will be side effects or not.Checklist