diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-20 10:16:06 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-20 10:16:06 +0000 |
commit | de2409702ba639f06cf340f5e3f3b7e671021d1b (patch) | |
tree | 252a7b57f2a057540ce2ec554678bde15ab69ca0 /crates/ra_syntax | |
parent | 648241ee930de08ba70b0b5c2172dfb3cc7a34c6 (diff) | |
parent | 72792f6bc5cc3c81b53fa8e71304b0f7321f8e22 (diff) |
Merge #2877
2877: "Insert explicit type " assist fix #2869, fix typo r=matklad a=TomasKralCZ
So this was quite straightforward. I basically looked at how the other assists work and tried doing something simillar. I also fixed a typo in the other assist.
Co-authored-by: TomasKralCZ <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index d9666cdca..cb0aee422 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -234,6 +234,10 @@ impl ast::LetStmt { | |||
234 | Some(node) => node.kind() == T![;], | 234 | Some(node) => node.kind() == T![;], |
235 | } | 235 | } |
236 | } | 236 | } |
237 | |||
238 | pub fn eq_token(&self) -> Option<SyntaxToken> { | ||
239 | self.syntax().children_with_tokens().find(|t| t.kind() == EQ).and_then(|it| it.into_token()) | ||
240 | } | ||
237 | } | 241 | } |
238 | 242 | ||
239 | impl ast::ExprStmt { | 243 | impl ast::ExprStmt { |