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

Implement std::error::Error for new metadata Error type #2528

Merged
merged 1 commit into from
May 31, 2023

Conversation

MarijnS95
Copy link
Contributor

Since the introduction of a new Error type in the metadata it is impossible to bubble up results from File::new() into anyhow using the ? operator because this type doesn't implement Error, while it can be trivially implemented with all functions left at their default implementation.

Fixes: https://github.com/microsoft/windows-rs/pull/2510/files#r1203845316

Since the introduction of [a new `Error` type in the metadata] it is
impossible to bubble up results from `File::new()` into `anyhow` using
the `?` operator because this type doesn't implement `Error`, while it
can be trivially implemented with all functions left at their default
implementation.

[a new `Error` type in the metadata]: https://github.com/microsoft/windows-rs/pull/2510/files#r1203845316
Copy link
Collaborator

@kennykerr kennykerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kennykerr kennykerr merged commit 0dc1f5e into microsoft:master May 31, 2023
@MarijnS95 MarijnS95 deleted the metadata-impl-error branch May 31, 2023 14:12
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

Successfully merging this pull request may close these issues.

2 participants