Skip to content

Commit 76ff088

Browse files
committed
use strum_macros
1 parent 1bba296 commit 76ff088

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

optee-utee/src/parameter.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl From<u32> for ParamTypes {
280280
}
281281
}
282282

283-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
283+
#[derive(Copy, Clone, Debug, Eq, PartialEq, strum_macros::Display)]
284284
pub enum ParamType {
285285
None = 0,
286286
ValueInput = 1,
@@ -291,20 +291,6 @@ pub enum ParamType {
291291
MemrefInout = 7,
292292
}
293293

294-
impl Display for ParamType {
295-
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
296-
match self {
297-
ParamType::None => write!(f, "None"),
298-
ParamType::ValueInput => write!(f, "ValueInput"),
299-
ParamType::ValueOutput => write!(f, "ValueOutput"),
300-
ParamType::ValueInout => write!(f, "ValueInout"),
301-
ParamType::MemrefInput => write!(f, "MemrefInput"),
302-
ParamType::MemrefOutput => write!(f, "MemrefOutput"),
303-
ParamType::MemrefInout => write!(f, "MemrefInout"),
304-
}
305-
}
306-
}
307-
308294
impl From<u32> for ParamType {
309295
fn from(value: u32) -> Self {
310296
match value {

0 commit comments

Comments
 (0)