Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/tests/sourcegen.rs')
| -rw-r--r-- | crates/ide-assists/src/tests/sourcegen.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ide-assists/src/tests/sourcegen.rs b/crates/ide-assists/src/tests/sourcegen.rs index 577bc0894e..d45e54186b 100644 --- a/crates/ide-assists/src/tests/sourcegen.rs +++ b/crates/ide-assists/src/tests/sourcegen.rs @@ -31,7 +31,7 @@ r#####" }} "######, &test_id, - §ion.assist_id, + &assist.id, reveal_hash_comments(§ion.before), reveal_hash_comments(§ion.after) ); @@ -61,7 +61,6 @@ r#####" } #[derive(Debug)] struct Section { - assist_id: String, doc: String, before: String, after: String, @@ -112,13 +111,11 @@ impl Assist { let before = take_until(lines.by_ref(), "```"); - let arrow = lines.next().unwrap(); - assert!(arrow.starts_with("->")); - let id = if arrow[2..].is_empty() { &assist.id } else { &arrow[2..] }; + assert_eq!(lines.next().unwrap().as_str(), "->"); assert_eq!(lines.next().unwrap().as_str(), "```"); let after = take_until(lines.by_ref(), "```"); - assist.sections.push(Section { assist_id: id.to_string(), doc, before, after }); + assist.sections.push(Section { doc, before, after }); } acc.push(assist) |