From 5e7a1a12038f822df346c65de613cc01882ce656 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 24 Jun 2020 12:01:17 +0200 Subject: Simplify --- crates/ra_ide/src/syntax_tree.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_ide/src/syntax_tree.rs') diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index a341684fd..33b1a0e16 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs @@ -104,7 +104,7 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Optionfn foo() {}<|>"#.trim()); + let (analysis, range) = analysis_and_range(r#"<|>fn foo() {}<|>"#.trim()); let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap(); assert_eq_text!( @@ -206,7 +206,7 @@ FN_DEF@0..11 .trim() ); - let (analysis, range) = single_file_with_range( + let (analysis, range) = analysis_and_range( r#"fn test() { <|>assert!(" fn foo() { @@ -242,7 +242,7 @@ EXPR_STMT@16..58 #[test] fn test_syntax_tree_inside_string() { - let (analysis, range) = single_file_with_range( + let (analysis, range) = analysis_and_range( r#"fn test() { assert!(" <|>fn foo() { @@ -276,7 +276,7 @@ SOURCE_FILE@0..12 ); // With a raw string - let (analysis, range) = single_file_with_range( + let (analysis, range) = analysis_and_range( r###"fn test() { assert!(r#" <|>fn foo() { @@ -310,7 +310,7 @@ SOURCE_FILE@0..12 ); // With a raw string - let (analysis, range) = single_file_with_range( + let (analysis, range) = analysis_and_range( r###"fn test() { assert!(r<|>#" fn foo() { -- cgit v1.2.3