Conversation
|
I agree that if there is a The default The friction of needing to import |
|
What about extending this to |
Which types from In my opinion, |
Exactly. If I'm using |
Are you saying that you feel like this path is too long: use color_eyre::eyre::prelude::*;You can add the use eyre::prelude::*;Considering that |
|
As a heavy user of
Using I believe that making users write
That’s merely a hack, and it quickly introduces issues with mismatched versions.
Facing a 1.0 release, it might even be most useful to consider merging the two. |
To back this up, this issue is the reason And just to confirm that I'm understanding what you're saying correctly @LeoniePhiline by:
You mean that accessing |
|
@LeoniePhiline I couldn't have phrased it better, thanks :) I agree with everything you said.
Ideally, you would interact with Should I open a new issue for making |
I noticed that both
|
Please feel free create a PR for this specific change. |
This adds a prelude module with:
bail!ensure!report!(rename pending fromeyre!in Rename theeyre!macro toreport!#271)OptionExtResultExtReportResultAllowing users to write:
I think that
eyre::Resultshould be in the prelude because it is just so very, very common to import it. There are 17,200 instances ofuse eyre::Resultcompared to 1,100 instances ofuse eyre::bail.Essentially the value of having
eyre::Resultin the prelude is greater than all the othereyreitems combined.Yes, it's true that we are shadowing the implicit
Resulttype defined in the standard library's prelude. However, we are shadowing it with a type alias, where the type alias still refers to the same standard library'sResulttype, just with a few generics specified to have default values.Closes #63