Skip to content

Commit e80726d

Browse files
committed
fix: remove colons from builtin names to prevent trigering completion
1 parent 9276e8f commit e80726d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/completion/builtin.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn match_callname(call: CallName) -> Option<FunctionTemplate> {
5555
CallName::UnwrapLeft(aliased_type) => {
5656
let ty = aliased_type.to_string();
5757
Some(FunctionTemplate::new(
58-
format!("unwrap_left::<{ty}>"),
58+
"unwrap_left",
5959
"unwrap_left",
6060
str_vec![format!("{ty}")],
6161
str_vec![format!("Either<{ty}, U>")],
@@ -73,7 +73,7 @@ let y: u8 = unwrap_left::<u8>(x); // 42
7373
CallName::UnwrapRight(aliased_type) => {
7474
let ty = aliased_type.to_string();
7575
Some(FunctionTemplate::new(
76-
format!("unwrap_right::<{ty}>"),
76+
"unwrap_right",
7777
"unwrap_right",
7878
str_vec![format!("{ty}")],
7979
str_vec![format!("Either<T, {ty}>")],
@@ -102,7 +102,7 @@ let y: u8 = unwrap(x); // 5
102102
CallName::IsNone(aliased_type) => {
103103
let ty = aliased_type.to_string();
104104
Some(FunctionTemplate::new(
105-
format!("is_none::<{ty}>"),
105+
format!("is_none"),
106106
"is_none",
107107
str_vec![format!("{ty}")],
108108
str_vec![format!("Option<{ty}>").as_str()],
@@ -137,7 +137,7 @@ let x: u32 = dbg!(42); // prints 42, returns 42
137137
```",
138138
)),
139139
CallName::Fold(_, _) => Some(FunctionTemplate::new(
140-
"fold::<f, N>",
140+
"fold",
141141
"fold",
142142
str_vec!["f", "N"],
143143
str_vec!["list: List<E,N>", "initial_accumulator: A"],
@@ -166,7 +166,7 @@ fn main() {
166166
",
167167
)),
168168
CallName::ArrayFold(_, _) => Some(FunctionTemplate::new(
169-
"array_fold::<f, N>",
169+
"array_fold",
170170
"array_fold",
171171
str_vec!["f", "N"],
172172
str_vec!["array: [E; N]", "initial_accumulator: A"],
@@ -193,7 +193,7 @@ fn main() {
193193
```",
194194
)),
195195
CallName::ForWhile(_) => Some(FunctionTemplate::new(
196-
"for_while::<f>",
196+
"for_while",
197197
"for_while",
198198
str_vec!["f"],
199199
str_vec!["accumulator: A", "context: C"],

0 commit comments

Comments
 (0)