diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-20 14:52:33 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-20 14:52:33 +0100 |
commit | 3983ccca4ac46bb7b206a5b373b10c9822280931 (patch) | |
tree | e72c3798558b7b0494990d1c994ebd9c0f3c03f3 /crates/ra_assists/src/ast_editor.rs | |
parent | dac6adbef90286f053f034eace9df65d6a19c0ff (diff) | |
parent | f6bcc2d7459a3e10090391a6f9b9a2789e9cab55 (diff) |
Merge #1566
1566: align SyntaxText API with upstream r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/ast_editor.rs')
-rw-r--r-- | crates/ra_assists/src/ast_editor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index 36235eb13..ab6c347ad 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs | |||
@@ -95,7 +95,7 @@ impl AstEditor<ast::NamedFieldList> { | |||
95 | position: InsertPosition<&'_ ast::NamedField>, | 95 | position: InsertPosition<&'_ ast::NamedField>, |
96 | field: &ast::NamedField, | 96 | field: &ast::NamedField, |
97 | ) { | 97 | ) { |
98 | let is_multiline = self.ast().syntax().text().contains('\n'); | 98 | let is_multiline = self.ast().syntax().text().contains_char('\n'); |
99 | let ws; | 99 | let ws; |
100 | let space = if is_multiline { | 100 | let space = if is_multiline { |
101 | ws = tokens::WsBuilder::new(&format!( | 101 | ws = tokens::WsBuilder::new(&format!( |