Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return error when constructing pubkey from slice #2576

Merged
merged 1 commit into from
Mar 14, 2024

Commits on Mar 12, 2024

  1. Return error when constructing pubkey from slice

    Constructing a pubkey using `PublicKey::from_slice` can fail for reasons
    other than just incorrect length - we should not be using `expect` but
    rather returning the error.
    
    A purist might argue that we are now returning a nested error type with
    an unreachable variant:
    
      `ParsePublicKeyError::Encoding(FromSliceError::InvalidLength)`
    
    Is this acceptable or do we want to further improve this?
    tcharding committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    6ecc41d View commit details
    Browse the repository at this point in the history