Skip to content

Further enhancements to Deref implementation#149

Open
tbates-redarc wants to merge 3 commits intorootcause-rs:mainfrom
tbates-redarc:report_deref_std_error
Open

Further enhancements to Deref implementation#149
tbates-redarc wants to merge 3 commits intorootcause-rs:mainfrom
tbates-redarc:report_deref_std_error

Conversation

@tbates-redarc
Copy link
Copy Markdown

The first commit is likely to the the most controversial as it uncovers some latent type inference ambiguities, which might impact downstream crates.

The second commit adds unit tests.

The third commit, following anyhow's lead, adds AsRef impls in addition to the Derefs.

For some reason this causes an ambiguity in type inference that wasn't there before, although the docs already warn about the potential for it. This could be a breaking change for downstream crates.
Allows Report to be used with methods that take `impl AsRef<dyn core::error::Error>` parameters.
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.

1 participant