Skip to content

Commit

Permalink
Change: Improve display implementation for Catefory
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Nov 23, 2022
1 parent db98844 commit dc7040d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions rust/nvtcache/src/nvt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,7 @@ pub enum Category {

impl fmt::Display for Category {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Category::ActInit => write!(f, "0"),
Category::ActScanner => write!(f, "1"),
Category::ActSettings => write!(f, "2"),
Category::ActGatherInfo => write!(f, "3"),
Category::ActAttack => write!(f, "4"),
Category::ActMixedAttack => write!(f, "5"),
Category::ActDestructiveAttack => write!(f, "6"),
Category::ActDenial => write!(f, "7"),
Category::ActKillHost => write!(f, "8"),
Category::ActFlood => write!(f, "9"),
Category::ActEnd => write!(f, "10"),
}
write!(f, "{}", (*self as i32).to_string())
}
}

Expand Down

0 comments on commit dc7040d

Please sign in to comment.