mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 13:13:17 +00:00
Add ok postfix completion
This commit is contained in:
parent
bcdedbb3d5
commit
e3b19da8c1
@ -175,6 +175,16 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
)
|
||||
.add_to(acc);
|
||||
|
||||
postfix_snippet(
|
||||
ctx,
|
||||
cap,
|
||||
&dot_receiver,
|
||||
"ok",
|
||||
"Ok(expr)",
|
||||
&format!("Ok({})", receiver_text),
|
||||
)
|
||||
.add_to(acc);
|
||||
|
||||
postfix_snippet(
|
||||
ctx,
|
||||
cap,
|
||||
@ -266,6 +276,7 @@ fn main() {
|
||||
sn if if expr {}
|
||||
sn match match expr {}
|
||||
sn not !expr
|
||||
sn ok Ok(expr)
|
||||
sn ref &expr
|
||||
sn refm &mut expr
|
||||
sn while while expr {}
|
||||
@ -287,6 +298,7 @@ fn main() {
|
||||
sn call function(expr)
|
||||
sn dbg dbg!(expr)
|
||||
sn match match expr {}
|
||||
sn ok Ok(expr)
|
||||
sn ref &expr
|
||||
sn refm &mut expr
|
||||
"#]],
|
||||
|
Loading…
Reference in New Issue
Block a user