Skip to content

Missing std::error::Error for genrandom::error::Error on Windows? #132

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
vi opened this issue Feb 8, 2020 · 4 comments
Closed

Missing std::error::Error for genrandom::error::Error on Windows? #132

vi opened this issue Feb 8, 2020 · 4 comments

Comments

@vi
Copy link

vi commented Feb 8, 2020

the trait `std::error::Error` is not implemented for `getrandom::error::Error`

Why error being a normal error is platform-dependent?

@newpavlov
Copy link
Member

Because getrandom is a no_std crate by default. std::error::Error implementation is feature-gated behind std feature, so you just need to enable it.

@vi
Copy link
Author

vi commented Feb 8, 2020

Why it gets auto-enabled on Linux?

@newpavlov
Copy link
Member

Because it was an oversight which we have to keep for backward compatibility, but we plan to remove it in v0.2 (see #98).

@josephlr
Copy link
Member

Closing this as this was fixed in 0.2 for #106. General 0.2 progress is tracked in #98

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

No branches or pull requests

3 participants