Skip to content

Constrain Signer::Error #30

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

Merged
merged 1 commit into from
Dec 10, 2021
Merged

Constrain Signer::Error #30

merged 1 commit into from
Dec 10, 2021

Conversation

kim
Copy link
Contributor

@kim kim commented Dec 10, 2021

In practice, most errors need to satisfy:

std::error::Error + Send + Sync + 'static

and Signer::Error is no exception.

By defining the bound on the trait here, some wild tricks involving
associated type bounds can be removed from link-crypto. This lets us
avoid a compiler bug in recent rustcs 0 without compromising
errrrgonomics.

In practice, most errors need to satisfy:

    std::error::Error + Send + Sync + 'static

and `Signer::Error` is no exception.

By defining the bound on the trait here, some wild tricks involving
associated type bounds can be removed from `link-crypto`. This lets us
avoid a compiler bug in recent `rustc`s [0] without compromising
errrrgonomics.

[0]: rust-lang/rust#90691

Signed-off-by: Kim Altintop <kim@eagain.st>
Copy link
Contributor

@FintanH FintanH left a comment

Choose a reason for hiding this comment

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

👍

@FintanH
Copy link
Contributor

FintanH commented Dec 10, 2021

Looks like your edition2021 woes are not behind you

@kim kim merged commit 1860322 into master Dec 10, 2021
@kim kim deleted the signer-error-send-sync-static branch December 10, 2021 15:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants