Skip to content

Commit fcb5f5a

Browse files
committed
add some useful derives
1 parent 69e1754 commit fcb5f5a

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/filesystem/filename.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::trace;
55

66
/// Various filename related errors that can occur.
77
#[cfg_attr(feature = "defmt-log", derive(defmt::Format))]
8-
#[derive(Debug, Clone)]
8+
#[derive(Debug, Clone, PartialEq, Eq)]
99
pub enum FilenameError {
1010
/// Tried to create a file with an invalid character.
1111
InvalidCharacter,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ macro_rules! warn {
158158

159159
/// All the ways the functions in this crate can fail.
160160
#[cfg_attr(feature = "defmt-log", derive(defmt::Format))]
161-
#[derive(Debug, Clone)]
161+
#[derive(Debug, Clone, PartialEq, Eq)]
162162
pub enum Error<E>
163163
where
164164
E: core::fmt::Debug,

src/sdcard/cid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use arbitrary_int::{u7, u12, u40};
55
use crate::sdcard::crc7;
66

77
/// Checksum is invalid.
8-
#[derive(Debug, thiserror::Error)]
8+
#[derive(Debug, PartialEq, Eq, Copy, Clone, thiserror::Error)]
99
#[error("checksum is invalid")]
1010
pub struct ChecksumInvalidError;
1111

src/sdcard/csd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub enum Csd {
1515
}
1616

1717
/// The CSD structure field is invalid.
18-
#[derive(Debug, PartialEq, Eq, thiserror::Error)]
18+
#[derive(Debug, PartialEq, Eq, Copy, Clone, thiserror::Error)]
1919
pub enum CsdCreationError {
2020
/// Invalid CSD structure field.
2121
#[error("invalid CSD structure field")]

0 commit comments

Comments
 (0)