summaryrefslogtreecommitdiffstats
path: root/vendor/signature/src/error.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/signature/src/error.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/signature/src/error.rs')
-rw-r--r--vendor/signature/src/error.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/vendor/signature/src/error.rs b/vendor/signature/src/error.rs
index 06e22d527..1bfaf33bf 100644
--- a/vendor/signature/src/error.rs
+++ b/vendor/signature/src/error.rs
@@ -22,11 +22,8 @@ pub type Result<T> = core::result::Result<T, Error>;
///
/// [BB'06]: https://en.wikipedia.org/wiki/Daniel_Bleichenbacher
#[derive(Default)]
+#[non_exhaustive]
pub struct Error {
- /// Prevent from being instantiated as `Error {}` when the `std` feature
- /// is disabled
- _private: (),
-
/// Source of the error (if applicable).
#[cfg(feature = "std")]
source: Option<Box<dyn std::error::Error + Send + Sync + 'static>>,
@@ -45,12 +42,10 @@ impl Error {
/// cases are for propagating errors related to external signers, e.g.
/// communication/authentication errors with HSMs, KMS, etc.
#[cfg(feature = "std")]
- #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn from_source(
source: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>,
) -> Self {
Self {
- _private: (),
source: Some(source.into()),
}
}