Skip to content

Commit

Permalink
apply & applydp: use static compile time perfect hash functions f…
Browse files Browse the repository at this point in the history
…or operations lookup

instead of run-time match string lookups
  • Loading branch information
jqnatividad committed Oct 18, 2023
1 parent f0e79b2 commit 01a459a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cmd/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ use crate::{
util, CliResult,
};

#[derive(EnumString)]
#[derive(Clone, EnumString)]
#[strum(use_phf)]
#[strum(ascii_case_insensitive)]
#[allow(non_camel_case_types)]
enum Operations {
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/applydp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ use crate::{
util, CliResult,
};

#[derive(EnumString)]
#[derive(Clone, EnumString)]
#[strum(use_phf)]
#[strum(ascii_case_insensitive)]
#[allow(non_camel_case_types)]
enum Operations {
Expand Down

0 comments on commit 01a459a

Please sign in to comment.