-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error: avoid leaking pem::PemError into api
Having `From<pem::PemError>` defined on the public `Error` type means that the `pem` type leaks into rcgen's public API, complicating semver incompatible updates. This commit updates the sites that previously used this trait to use the crate internal `ExternalError` extension trait to map the `PemError` err to the generic rcgen `Error::PemError` err. Additionally, the `rcgen::Error::PemError` variant is changed to hold a `String` with the `pem::PemError` error string instead of the type itself. This allows the `From` impl on `Error` to be removed, fixing the type leak.
- Loading branch information
Showing
2 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters