diff options
author | Benjamin Coenen <[email protected]> | 2020-05-06 08:57:00 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-06 08:57:00 +0100 |
commit | c4d128e454448191c4b21d8e151c673e4c42376e (patch) | |
tree | 17cf5bbf429642c52708cd0d3c1d8885b63543f0 /crates/ra_syntax/src/fuzz.rs | |
parent | 0bf02f5ccac99c91f10ef46bb06ff2ea316c382c (diff) | |
parent | 30eb458b4fa8adcecd8cbf731bd1cfa9a7a8b88b (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into fix_4311
Diffstat (limited to 'crates/ra_syntax/src/fuzz.rs')
-rw-r--r-- | crates/ra_syntax/src/fuzz.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/fuzz.rs b/crates/ra_syntax/src/fuzz.rs index 10fbe3176..39f9b12ab 100644 --- a/crates/ra_syntax/src/fuzz.rs +++ b/crates/ra_syntax/src/fuzz.rs | |||
@@ -5,7 +5,7 @@ use std::{ | |||
5 | str::{self, FromStr}, | 5 | str::{self, FromStr}, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use ra_text_edit::AtomTextEdit; | 8 | use ra_text_edit::Indel; |
9 | 9 | ||
10 | use crate::{validation, AstNode, SourceFile, TextRange}; | 10 | use crate::{validation, AstNode, SourceFile, TextRange}; |
11 | 11 | ||
@@ -22,7 +22,7 @@ pub fn check_parser(text: &str) { | |||
22 | #[derive(Debug, Clone)] | 22 | #[derive(Debug, Clone)] |
23 | pub struct CheckReparse { | 23 | pub struct CheckReparse { |
24 | text: String, | 24 | text: String, |
25 | edit: AtomTextEdit, | 25 | edit: Indel, |
26 | edited_text: String, | 26 | edited_text: String, |
27 | } | 27 | } |
28 | 28 | ||
@@ -43,7 +43,7 @@ impl CheckReparse { | |||
43 | TextRange::at(delete_start.try_into().unwrap(), delete_len.try_into().unwrap()); | 43 | TextRange::at(delete_start.try_into().unwrap(), delete_len.try_into().unwrap()); |
44 | let edited_text = | 44 | let edited_text = |
45 | format!("{}{}{}", &text[..delete_start], &insert, &text[delete_start + delete_len..]); | 45 | format!("{}{}{}", &text[..delete_start], &insert, &text[delete_start + delete_len..]); |
46 | let edit = AtomTextEdit { delete, insert }; | 46 | let edit = Indel { delete, insert }; |
47 | Some(CheckReparse { text, edit, edited_text }) | 47 | Some(CheckReparse { text, edit, edited_text }) |
48 | } | 48 | } |
49 | 49 | ||