tool: Derive Eq, PartialEq on enums
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
4fa389e1bd
commit
166e03972b
@ -14,7 +14,7 @@ use crate::{
|
|||||||
SpiTarget,
|
SpiTarget,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
enum Cmd {
|
enum Cmd {
|
||||||
// None = 0,
|
// None = 0,
|
||||||
@ -46,7 +46,7 @@ const CMD_SPI_FLAG_DISABLE: u8 = 1 << 1;
|
|||||||
const CMD_SPI_FLAG_SCRATCH: u8 = 1 << 2;
|
const CMD_SPI_FLAG_SCRATCH: u8 = 1 << 2;
|
||||||
const CMD_SPI_FLAG_BACKUP: u8 = 1 << 3;
|
const CMD_SPI_FLAG_BACKUP: u8 = 1 << 3;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum SecurityState {
|
pub enum SecurityState {
|
||||||
// Default value, flashing is prevented, cannot be set with security_set
|
// Default value, flashing is prevented, cannot be set with security_set
|
||||||
|
@ -21,7 +21,7 @@ pub trait Spi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Target which will receive SPI commands
|
/// Target which will receive SPI commands
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
pub enum SpiTarget {
|
pub enum SpiTarget {
|
||||||
/// The ROM normally used by the EC
|
/// The ROM normally used by the EC
|
||||||
Main,
|
Main,
|
||||||
|
Reference in New Issue
Block a user