Skip to content

Commit fd4a88e

Browse files
committed
cargo clippy
1 parent 15fed18 commit fd4a88e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)