Add box postfix completion

This commit is contained in:
Kan-Ru Chen 2019-06-23 10:41:43 +09:00
parent 7d79be3280
commit bf7a35294d
2 changed files with 10 additions and 1 deletions

View file

@ -51,6 +51,8 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
)
.add_to(acc);
postfix_snippet(ctx, "dbg", "dbg!(expr)", &format!("dbg!({})", receiver_text)).add_to(acc);
postfix_snippet(ctx, "box", "Box::new(expr)", &format!("Box::new({})", receiver_text))
.add_to(acc);
}
}