Skip to content

Commit 50d3895

Browse files
hamirmahalsharkdp
authored andcommitted
style: simplify string search in src/completer.rs
1 parent 650a064 commit 50d3895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numbat-cli/src/completer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl Completer for NumbatCompleter {
123123
});
124124

125125
// don't add an opening paren if we're completing after a reverse function call
126-
let add_paren = !line[..pos].find("//").is_some();
126+
let add_paren = !line[..pos].contains("//");
127127

128128
let candidates = self
129129
.context

0 commit comments

Comments
 (0)