Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Jun 22, 2025

  • Changes all Tag::*_error methods to return ErrorKind rather than Error, and changes call sites where these methods were used with a Reader in scope to call reader.error() to ensure error position is propagated appropriately.
  • Locates sites of ErrorKind::*.into() where a Reader is in scope and changes them to use reader.error()

NOTE: draft because it needs changes to elliptic-curve

cc @dishmaker

@tarcieri tarcieri requested a review from baloo June 22, 2025 00:47
tarcieri added a commit to RustCrypto/traits that referenced this pull request Jun 22, 2025
@tarcieri tarcieri force-pushed the der/error-position-tracking-improvements branch from 968450d to ed213b0 Compare June 22, 2025 02:20
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jun 22, 2025
- Changes all `Tag::*_error` methods to return `ErrorKind` rather than
  `Error`, and changes call sites where these methods were used with
  a `Reader` in scope to call `reader.error()` to ensure error position
  is propagated appropriately.
- Locates sites of `ErrorKind::*.into()` where a `Reader` is in scope
  and changes them to use `reader.error()`
@tarcieri tarcieri force-pushed the der/error-position-tracking-improvements branch from ed213b0 to c506fdc Compare June 22, 2025 02:43
@tarcieri tarcieri marked this pull request as ready for review June 22, 2025 03:00
@tarcieri tarcieri merged commit 4cb99df into master Jun 22, 2025
166 checks passed
@tarcieri tarcieri deleted the der/error-position-tracking-improvements branch June 22, 2025 03:01
tarcieri added a commit to RustCrypto/traits that referenced this pull request Jun 22, 2025
tarcieri added a commit to RustCrypto/traits that referenced this pull request Jun 22, 2025
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jun 22, 2025
tarcieri added a commit to RustCrypto/signatures that referenced this pull request Jun 22, 2025
@dishmaker
Copy link
Contributor

Looks like you're preparing to remove impl From<ErrorKind> for Error

@tarcieri
Copy link
Member Author

@dishmaker it’s still used in several places where a Reader is unavailable, like type conversions, but it is now indeed used in a lot fewer places

scv35 added a commit to scv35/Signature-algorithms that referenced this pull request Jul 4, 2025
@smarime smarime mentioned this pull request Jul 7, 2025
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.

3 participants