Skip to content

Commit 8e46a74

Browse files
committed
fix deprecated not syntax
1 parent 05621eb commit 8e46a74

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/fuzzy_search.mbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn[Query : StringLike, Item : StringLike] score_single_query(
6060
case_sensitive~ : Bool,
6161
) -> Int {
6262
let { found, start_idx, end_idx } = find_start_end_indices(query~, item~)
63-
if not(found) {
63+
if !found {
6464
0
6565
} else {
6666
let start_char_class = if start_idx == 0 {
@@ -96,7 +96,7 @@ fn[Query : StringLike, Item : StringLike] score_single_query(
9696
max(with_start_of_item_bonus, prev_char_score)
9797
}
9898
let with_wrong_case_penalty = if item_char == query_char ||
99-
not(case_sensitive) {
99+
!case_sensitive {
100100
with_consecutive_bonus
101101
} else {
102102
with_consecutive_bonus - wrong_case_penalty
@@ -113,7 +113,7 @@ fn[Query : StringLike, Item : StringLike] score_single_query(
113113
prev_char_score = this_char_score
114114
in_gap = false
115115
} else {
116-
let this_char_score = if not(in_gap) {
116+
let this_char_score = if !in_gap {
117117
-continue_gap_penalty
118118
} else {
119119
-start_gap_penalty

src/query.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn Query::new(query : String) -> Query {
1515
let queries = query
1616
.split(" ")
1717
.filter_map(fn(s) {
18-
if not(s.is_empty()) {
18+
if !s.is_empty() {
1919
Some(s.to_string())
2020
} else {
2121
None

0 commit comments

Comments
 (0)