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

Change error impl to the one in core #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ categories = ["cryptography"]
[features]
default = []
# `std` feature enables an `Error` impl for `CoseError`
std = []

[dependencies]
ciborium = { version = "^0.2.1", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ example](examples/signature.rs) for documentation on how to use the code.

**This repo is under construction** and so details of the API and the code may change without warning.

## Features

The `std` feature of the crate enables an implementation of `std::error::Error` for `CoseError`.

## `no_std` Support

Expand Down
3 changes: 1 addition & 2 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ impl core::fmt::Display for CoseError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for CoseError {}
impl core::error::Error for CoseError {}

impl CoseError {
fn fmt_msg(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
Expand Down