Skip to content

Conversation

tarcieri
Copy link
Member

Unfortunately the Default impl on core array types is still problematic here:

error[E0277]: the trait bound `[u8; 64]: Default` is not satisfied
   --> ed25519/src/lib.rs:339:17
    |
339 |     type Repr = SignatureBytes;
    |                 ^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[u8; 64]`

Unfortunately the `Default` impl on `core` array types is still
problematic here:

error[E0277]: the trait bound `[u8; 64]: Default` is not satisfied
   --> ed25519/src/lib.rs:339:17
    |
339 |     type Repr = SignatureBytes;
    |                 ^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[u8; 64]`
@tarcieri tarcieri merged commit cdf6677 into master Oct 30, 2022
@tarcieri tarcieri deleted the signature/remove-default-bound-on-repr branch October 30, 2022 02:51
tarcieri added a commit that referenced this pull request Oct 30, 2022
Without a `Default` bound (#1143) there's little purpose to having an
`AsMut` bound on `Repr`, which would allow `Default` to construct an
empty bytestring and `AsMut` used to write into it.

Given there isn't an obvious use case, fewer bounds are better.
tarcieri added a commit that referenced this pull request Oct 30, 2022
Without a `Default` bound (#1143) there's little purpose to having an
`AsMut` bound on `Repr`, which would allow `Default` to construct an
empty bytestring and `AsMut` used to write into it.

Given there isn't an obvious use case, fewer bounds are better.
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