Skip to content

Commit f193677

Browse files
committed
Remove unneeded to_string call
In `syn`, there is a `PartialEq` impl for `Ident` that allows values of this type to be compared directly against strings without calling `to_string`, so let's do that.
1 parent e0ddca9 commit f193677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trait-variant/src/variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn make_variant(
6060
.variant
6161
.bounds
6262
.iter()
63-
.any(|b| b.path.segments.last().unwrap().ident.to_string() == "Send")
63+
.any(|b| b.path.segments.last().unwrap().ident == "Send")
6464
{
6565
quote! { #[allow(async_fn_in_trait)] }
6666
} else {

0 commit comments

Comments
 (0)