diff options
Diffstat (limited to 'crates/ide_completion/src/completions/postfix')
-rw-r--r-- | crates/ide_completion/src/completions/postfix/format_like.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/ide_completion/src/completions/postfix/format_like.rs b/crates/ide_completion/src/completions/postfix/format_like.rs index 0dcb3e898..2dc13c293 100644 --- a/crates/ide_completion/src/completions/postfix/format_like.rs +++ b/crates/ide_completion/src/completions/postfix/format_like.rs | |||
@@ -4,15 +4,15 @@ | |||
4 | // | 4 | // |
5 | // The following postfix snippets are available: | 5 | // The following postfix snippets are available: |
6 | // | 6 | // |
7 | // - `format` -> `format!(...)` | 7 | // * `format` -> `format!(...)` |
8 | // - `panic` -> `panic!(...)` | 8 | // * `panic` -> `panic!(...)` |
9 | // - `println` -> `println!(...)` | 9 | // * `println` -> `println!(...)` |
10 | // - `log`: | 10 | // * `log`: |
11 | // + `logd` -> `log::debug!(...)` | 11 | // ** `logd` -> `log::debug!(...)` |
12 | // + `logt` -> `log::trace!(...)` | 12 | // ** `logt` -> `log::trace!(...)` |
13 | // + `logi` -> `log::info!(...)` | 13 | // ** `logi` -> `log::info!(...)` |
14 | // + `logw` -> `log::warn!(...)` | 14 | // ** `logw` -> `log::warn!(...)` |
15 | // + `loge` -> `log::error!(...)` | 15 | // ** `loge` -> `log::error!(...)` |
16 | // | 16 | // |
17 | // image::https://user-images.githubusercontent.com/48062697/113020656-b560f500-917a-11eb-87de-02991f61beb8.gif[] | 17 | // image::https://user-images.githubusercontent.com/48062697/113020656-b560f500-917a-11eb-87de-02991f61beb8.gif[] |
18 | 18 | ||
@@ -53,7 +53,7 @@ pub(crate) fn add_format_like_completions( | |||
53 | for (label, macro_name) in KINDS { | 53 | for (label, macro_name) in KINDS { |
54 | let snippet = parser.into_suggestion(macro_name); | 54 | let snippet = parser.into_suggestion(macro_name); |
55 | 55 | ||
56 | postfix_snippet(ctx, cap, &dot_receiver, label, macro_name, &snippet).add_to(acc); | 56 | postfix_snippet(ctx, cap, dot_receiver, label, macro_name, &snippet).add_to(acc); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } | 59 | } |
@@ -91,7 +91,7 @@ enum State { | |||
91 | impl FormatStrParser { | 91 | impl FormatStrParser { |
92 | pub(crate) fn new(input: String) -> Self { | 92 | pub(crate) fn new(input: String) -> Self { |
93 | Self { | 93 | Self { |
94 | input: input, | 94 | input, |
95 | output: String::new(), | 95 | output: String::new(), |
96 | extracted_expressions: Vec::new(), | 96 | extracted_expressions: Vec::new(), |
97 | state: State::NotExpr, | 97 | state: State::NotExpr, |