Skip to content

Commit

Permalink
Remove unneeded to_string call
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
traviscross committed Dec 18, 2023
1 parent e0ddca9 commit f193677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trait-variant/src/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn make_variant(
.variant
.bounds
.iter()
.any(|b| b.path.segments.last().unwrap().ident.to_string() == "Send")
.any(|b| b.path.segments.last().unwrap().ident == "Send")
{
quote! { #[allow(async_fn_in_trait)] }
} else {
Expand Down

0 comments on commit f193677

Please sign in to comment.