aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/generate_derive.rs
diff options
context:
space:
mode:
authorKevaundray Wedderburn <[email protected]>2021-01-06 20:15:48 +0000
committerKevaundray Wedderburn <[email protected]>2021-01-07 12:09:23 +0000
commit72b9a4fbd3c12f3250b9157a1d44230e04ec8b22 (patch)
treec138363e3592c690d841aeedb9ac97d6b2ff4396 /crates/assists/src/handlers/generate_derive.rs
parent171c3c08fe245938fb25321394233de5fe2abc7c (diff)
Change <|> to $0 - Rebase
Diffstat (limited to 'crates/assists/src/handlers/generate_derive.rs')
-rw-r--r--crates/assists/src/handlers/generate_derive.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/assists/src/handlers/generate_derive.rs b/crates/assists/src/handlers/generate_derive.rs
index 314504e15..f876b7684 100644
--- a/crates/assists/src/handlers/generate_derive.rs
+++ b/crates/assists/src/handlers/generate_derive.rs
@@ -13,7 +13,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists};
13// ``` 13// ```
14// struct Point { 14// struct Point {
15// x: u32, 15// x: u32,
16// y: u32,<|> 16// y: u32,$0
17// } 17// }
18// ``` 18// ```
19// -> 19// ->
@@ -76,12 +76,12 @@ mod tests {
76 fn add_derive_new() { 76 fn add_derive_new() {
77 check_assist( 77 check_assist(
78 generate_derive, 78 generate_derive,
79 "struct Foo { a: i32, <|>}", 79 "struct Foo { a: i32, $0}",
80 "#[derive($0)]\nstruct Foo { a: i32, }", 80 "#[derive($0)]\nstruct Foo { a: i32, }",
81 ); 81 );
82 check_assist( 82 check_assist(
83 generate_derive, 83 generate_derive,
84 "struct Foo { <|> a: i32, }", 84 "struct Foo { $0 a: i32, }",
85 "#[derive($0)]\nstruct Foo { a: i32, }", 85 "#[derive($0)]\nstruct Foo { a: i32, }",
86 ); 86 );
87 } 87 }
@@ -90,7 +90,7 @@ mod tests {
90 fn add_derive_existing() { 90 fn add_derive_existing() {
91 check_assist( 91 check_assist(
92 generate_derive, 92 generate_derive,
93 "#[derive(Clone)]\nstruct Foo { a: i32<|>, }", 93 "#[derive(Clone)]\nstruct Foo { a: i32$0, }",
94 "#[derive(Clone$0)]\nstruct Foo { a: i32, }", 94 "#[derive(Clone$0)]\nstruct Foo { a: i32, }",
95 ); 95 );
96 } 96 }
@@ -102,7 +102,7 @@ mod tests {
102 " 102 "
103/// `Foo` is a pretty important struct. 103/// `Foo` is a pretty important struct.
104/// It does stuff. 104/// It does stuff.
105struct Foo { a: i32<|>, } 105struct Foo { a: i32$0, }
106 ", 106 ",
107 " 107 "
108/// `Foo` is a pretty important struct. 108/// `Foo` is a pretty important struct.
@@ -121,7 +121,7 @@ struct Foo { a: i32, }
121struct SomeThingIrrelevant; 121struct SomeThingIrrelevant;
122/// `Foo` is a pretty important struct. 122/// `Foo` is a pretty important struct.
123/// It does stuff. 123/// It does stuff.
124struct Foo { a: i32<|>, } 124struct Foo { a: i32$0, }
125struct EvenMoreIrrelevant; 125struct EvenMoreIrrelevant;
126 ", 126 ",
127 "/// `Foo` is a pretty important struct. 127 "/// `Foo` is a pretty important struct.