Skip to content

Commit 39c193b

Browse files
committed
update
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent b013dad commit 39c193b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

encodings/fsst/src/dfa/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ enum LikeKind<'a> {
209209
impl<'a> LikeKind<'a> {
210210
fn parse(pattern: &'a [u8]) -> Option<Self> {
211211
// `prefix%` (including just `%` where prefix is empty)
212-
if let Some(prefix) = pattern.strip_suffix(&[b'%'])
212+
if let Some(prefix) = pattern.strip_suffix(b"%")
213213
&& !prefix.contains(&b'%')
214214
&& !prefix.contains(&b'_')
215215
{
216216
return Some(LikeKind::Prefix(prefix));
217217
}
218218

219219
// `%needle%`
220-
let inner = pattern.strip_prefix(&[b'%'])?.strip_suffix(&[b'%'])?;
220+
let inner = pattern.strip_prefix(b"%")?.strip_suffix(b"%")?;
221221
if !inner.contains(&b'%') && !inner.contains(&b'_') {
222222
return Some(LikeKind::Contains(inner));
223223
}

0 commit comments

Comments
 (0)