Skip to content
Open
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
2 changes: 1 addition & 1 deletion aes-kw/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::fmt;

/// Errors emitted from the wrap and unwrap operations.
#[derive(Debug, PartialEq, Eq)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also worth to derive Copy and Hash as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hesitant to add Copy because it can become very restrictive if more variants are added in the future. As for Hash, are errors likely to be used as hashmap keys? I think this current set of traits is the right set of tradeoffs, and consistent with most of the other RustCrypto crates' error enums.

Copy link
Copy Markdown
Member

@newpavlov newpavlov May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this enum is not marked with #[non_exhaustive] addition of new variants would be a breaking change anyway. Derivation of Hash is just for completeness sake.

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum Error {
/// Input data length invalid.
InvalidDataSize,
Expand Down
Loading