File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,13 @@ pub fn derive_error(input: TokenStream) -> TokenStream {
183183 } ;
184184
185185 format ! (
186- r# "impl ::{std_crate}::fmt::Display for {name} {{
186+ r"impl ::{std_crate}::fmt::Display for {name} {{
187187 fn fmt(&self, f: &mut ::{std_crate}::fmt::Formatter<'_>) ->
188188 ::{std_crate}::result::Result<(), ::{std_crate}::fmt::Error>
189189 {{
190190 {display_matches}
191191 }}
192- }}"#
192+ }}"
193193 )
194194 } ;
195195
@@ -201,25 +201,25 @@ pub fn derive_error(input: TokenStream) -> TokenStream {
201201 let variant_name = v. name ;
202202 let from_ty = & v. fields [ & index] ;
203203 let body = if v. ty == VariantType :: Tuple {
204- format ! ( r# "Self::{variant_name}(value)"# )
204+ format ! ( r"Self::{variant_name}(value)" )
205205 } else {
206- format ! ( r# "Self::{variant_name} {{ {index}: value }}"# )
206+ format ! ( r"Self::{variant_name} {{ {index}: value }}" )
207207 } ;
208208
209209 Some ( format ! (
210- r# "impl ::{std_crate}::convert::From<{from_ty}> for {name} {{
210+ r"impl ::{std_crate}::convert::From<{from_ty}> for {name} {{
211211 fn from(value: {from_ty}) -> Self {{
212212 {body}
213213 }}
214- }}"#
214+ }}"
215215 ) )
216216 }
217217 _ => None ,
218218 } )
219219 . collect :: < String > ( ) ;
220220
221221 let code = TokenStream :: from_str ( & format ! (
222- r# "
222+ r"
223223 impl ::{std_crate}::error::Error for {name} {{
224224 fn source(&self) -> Option<&(dyn ::{std_crate}::error::Error + 'static)> {{
225225 match self {{
@@ -231,7 +231,7 @@ pub fn derive_error(input: TokenStream) -> TokenStream {
231231
232232 {display_impl}
233233 {from_impls}
234- "#
234+ "
235235 ) ) ;
236236
237237 match code {
You can’t perform that action at this time.
0 commit comments