diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/assists/src/handlers/generate_from_impl_for_enum.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/assists/src/handlers/generate_from_impl_for_enum.rs b/crates/assists/src/handlers/generate_from_impl_for_enum.rs index d9af6ab11..71897e6eb 100644 --- a/crates/assists/src/handlers/generate_from_impl_for_enum.rs +++ b/crates/assists/src/handlers/generate_from_impl_for_enum.rs | |||
@@ -56,7 +56,7 @@ pub(crate) fn generate_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext | |||
56 | 56 | ||
57 | impl From<{0}> for {1} {{ | 57 | impl From<{0}> for {1} {{ |
58 | fn from(v: {0}) -> Self {{ | 58 | fn from(v: {0}) -> Self {{ |
59 | {1}::{2}(v) | 59 | Self::{2}(v) |
60 | }} | 60 | }} |
61 | }}"#, | 61 | }}"#, |
62 | path.syntax(), | 62 | path.syntax(), |
@@ -106,7 +106,7 @@ mod tests { | |||
106 | 106 | ||
107 | impl From<u32> for A { | 107 | impl From<u32> for A { |
108 | fn from(v: u32) -> Self { | 108 | fn from(v: u32) -> Self { |
109 | A::One(v) | 109 | Self::One(v) |
110 | } | 110 | } |
111 | }"#, | 111 | }"#, |
112 | ); | 112 | ); |
@@ -121,7 +121,7 @@ impl From<u32> for A { | |||
121 | 121 | ||
122 | impl From<foo::bar::baz::Boo> for A { | 122 | impl From<foo::bar::baz::Boo> for A { |
123 | fn from(v: foo::bar::baz::Boo) -> Self { | 123 | fn from(v: foo::bar::baz::Boo) -> Self { |
124 | A::One(v) | 124 | Self::One(v) |
125 | } | 125 | } |
126 | }"#, | 126 | }"#, |
127 | ); | 127 | ); |
@@ -157,7 +157,7 @@ enum A { $0One(u32), } | |||
157 | 157 | ||
158 | impl From<u32> for A { | 158 | impl From<u32> for A { |
159 | fn from(v: u32) -> Self { | 159 | fn from(v: u32) -> Self { |
160 | A::One(v) | 160 | Self::One(v) |
161 | } | 161 | } |
162 | } | 162 | } |
163 | "#, | 163 | "#, |
@@ -183,7 +183,7 @@ pub trait From<T> { | |||
183 | 183 | ||
184 | impl From<u32> for A { | 184 | impl From<u32> for A { |
185 | fn from(v: u32) -> Self { | 185 | fn from(v: u32) -> Self { |
186 | A::One(v) | 186 | Self::One(v) |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||