Skip to content

Commit 953c45d

Browse files
committed
Derive PartialEq in enums
1 parent bc4a225 commit 953c45d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ fn write_enum(
444444
variants: &[ValDescription],
445445
) -> Result<()> {
446446
writeln!(w, "/// Defined values for {}", signal.name())?;
447-
writeln!(w, "#[derive(Clone, Copy)]")?;
447+
writeln!(w, "#[derive(Clone, Copy, PartialEq)]")?;
448448
writeln!(w, r##"#[cfg_attr(feature = "debug", derive(Debug))]"##)?;
449449
writeln!(w, "pub enum {} {{", enum_name(msg, signal))?;
450450
{

testing/can-messages/src/messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl core::convert::TryFrom<&[u8]> for Bar {
344344
}
345345

346346
/// Defined values for Four
347-
#[derive(Clone, Copy)]
347+
#[derive(Clone, Copy, PartialEq)]
348348
#[cfg_attr(feature = "debug", derive(Debug))]
349349
pub enum BarFour {
350350
Off,

0 commit comments

Comments
 (0)