Skip to content

[BREAKING] Fix TrustedOrigins default issue#327

Open
saoirse-a wants to merge 2 commits into
eclipse-biscuit:mainfrom
saoirse-a:trusted-origin-default
Open

[BREAKING] Fix TrustedOrigins default issue#327
saoirse-a wants to merge 2 commits into
eclipse-biscuit:mainfrom
saoirse-a:trusted-origin-default

Conversation

@saoirse-a
Copy link
Copy Markdown
Contributor

TrustedOrigins implements an inherent constructor called default and also has a derived implementation of Default. These two constructors have different behavior.

This means that TrustedOrigins::default() and <TrustedOrigins as Default>::default() construct different TrustedOrigins types. This is surprising.

This PR changes the behavior of the Default trait constructor to match the behavior of the inherent constructor.

TrustedOrigins implements an inherent constructor called default and also
has a derived implementation of Default. **These two constructors have
different behavior.**

This means that `TrustedOrigins::default()` and `<TrustedOrigins as
Default>::default()` construct different `TrustedOrigins` types. This is
surprising.

This PR changes the behavior of the Default trait constructor to match
the behavior of the inherent constructor.
Copy link
Copy Markdown
Contributor

@divarvel divarvel left a comment

Choose a reason for hiding this comment

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

oh, nice catch

@divarvel
Copy link
Copy Markdown
Contributor

Could you add an entry in the changelog as well?

@saoirse-a
Copy link
Copy Markdown
Contributor Author

Added to the changelog under 7.0.0

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