Skip to content

Commit

Permalink
modify impl<M> RuleShortcut<M> for StartWith
Browse files Browse the repository at this point in the history
  • Loading branch information
asuper0 authored and tu6ge committed Sep 5, 2023
1 parent adc38f7 commit 0c928e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rule/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,8 @@ impl<M> RuleShortcut<M> for StartWith<&'static str> {
}
fn call(&mut self, value: &mut Value) -> bool {
match value {
Value::Int8(_) => false,
Value::String(s) => s.starts_with(&self.0),
Value::Struct(_) => false,
_ => todo!(),
Value::String(s) => s.starts_with(self.0),
_ => false,
}
}
}
Expand Down

0 comments on commit 0c928e3

Please sign in to comment.