Skip to content

Commit

Permalink
refactor(cubesql): Fix manual_strip warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mcheshkov committed Dec 20, 2024
1 parent 520ff2a commit 3b57a8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion rust/cubesql/cubesql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ len_zero = "allow"
let_and_return = "allow"
manual_flatten = "allow"
manual_range_contains = "allow"
manual_strip = "allow"
map_clone = "allow"
map_flatten = "allow"
map_identity = "allow"
Expand Down
7 changes: 4 additions & 3 deletions rust/cubesql/cubesql/src/compile/rewrite/rules/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2780,12 +2780,13 @@ impl FilterRules {
value.to_string()
}
} else if op == "endsWith" || op == "notEndsWith" {
if value.starts_with("%") {
let without_wildcard = value[1..].to_string();
if let Some(without_wildcard) =
value.strip_prefix("%")
{
if without_wildcard.contains("%") {
continue;
}
without_wildcard
without_wildcard.to_string()
} else {
value.to_string()
}
Expand Down

0 comments on commit 3b57a8d

Please sign in to comment.