]> git.lizzy.rs Git - rust.git/commitdiff
format-postfix completion takes format instead of fmt
authorLukas Wirth <lukastw97@gmail.com>
Sat, 26 Dec 2020 16:55:48 +0000 (17:55 +0100)
committerLukas Wirth <lukastw97@gmail.com>
Tue, 29 Dec 2020 11:28:46 +0000 (12:28 +0100)
crates/completion/src/completions/postfix.rs
crates/completion/src/completions/postfix/format_like.rs

index d6db82a93bbc49fa5529dd7be59dc32ec87f0850..3883d6d21447e89a7b6a6ca0a87465b4f7d3b763 100644 (file)
@@ -502,7 +502,7 @@ fn postfix_completion_for_references() {
     #[test]
     fn postfix_completion_for_format_like_strings() {
         check_edit(
-            "fmt",
+            "format",
             r#"fn main() { "{some_var:?}".<|> }"#,
             r#"fn main() { format!("{:?}", some_var) }"#,
         );
index 88ba86acb685fb8bfe0c99c3795c51cd614ebe6d..ea41e01c50efb7fa03b3a13f641a92e9bf19bafc 100644 (file)
@@ -22,7 +22,7 @@
 
 /// Mapping ("postfix completion item" => "macro to use")
 static KINDS: &[(&str, &str)] = &[
-    ("fmt", "format!"),
+    ("format", "format!"),
     ("panic", "panic!"),
     ("println", "println!"),
     ("eprintln", "eprintln!"),