From 20bd4ddd4e7ee92259b08fa89d53c6aa17aa2682 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 26 Dec 2020 17:55:48 +0100 Subject: format-postfix completion takes format instead of fmt --- crates/completion/src/completions/postfix.rs | 2 +- crates/completion/src/completions/postfix/format_like.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/completion/src/completions/postfix.rs b/crates/completion/src/completions/postfix.rs index d6db82a93..3883d6d21 100644 --- a/crates/completion/src/completions/postfix.rs +++ b/crates/completion/src/completions/postfix.rs @@ -502,7 +502,7 @@ fn main() { #[test] fn postfix_completion_for_format_like_strings() { check_edit( - "fmt", + "format", r#"fn main() { "{some_var:?}".<|> }"#, r#"fn main() { format!("{:?}", some_var) }"#, ); diff --git a/crates/completion/src/completions/postfix/format_like.rs b/crates/completion/src/completions/postfix/format_like.rs index 88ba86acb..ea41e01c5 100644 --- a/crates/completion/src/completions/postfix/format_like.rs +++ b/crates/completion/src/completions/postfix/format_like.rs @@ -22,7 +22,7 @@ use syntax::ast::{self, AstToken}; /// Mapping ("postfix completion item" => "macro to use") static KINDS: &[(&str, &str)] = &[ - ("fmt", "format!"), + ("format", "format!"), ("panic", "panic!"), ("println", "println!"), ("eprintln", "eprintln!"), -- cgit v1.2.3