Skip to content

Commit

Permalink
fix: clippy error with `cargo clippy --all-targets --all-features -- …
Browse files Browse the repository at this point in the history
…-D warning` command (#3808)
  • Loading branch information
chansuke authored Sep 6, 2024
1 parent dff0a0e commit 72c6ce6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions xtask/codegen/src/generate_configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl RegistryVisitor<JsLanguage> for LintRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -52,7 +52,7 @@ impl RegistryVisitor<JsonLanguage> for LintRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -71,7 +71,7 @@ impl RegistryVisitor<CssLanguage> for LintRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -90,7 +90,7 @@ impl RegistryVisitor<GraphqlLanguage> for LintRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -114,7 +114,7 @@ impl RegistryVisitor<JsLanguage> for AssistsRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -133,7 +133,7 @@ impl RegistryVisitor<JsonLanguage> for AssistsRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -152,7 +152,7 @@ impl RegistryVisitor<CssLanguage> for AssistsRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand All @@ -171,7 +171,7 @@ impl RegistryVisitor<GraphqlLanguage> for AssistsRulesVisitor {
{
self.groups
.entry(<R::Group as RuleGroup>::NAME)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(R::METADATA.name, R::METADATA);
}
}
Expand Down
2 changes: 1 addition & 1 deletion xtask/codegen/src/generate_license.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn create_data(license_list: LicenseList) -> io::Result<TokenStream> {
.see_also
.iter()
.map(|see_also| {
let see_also = Literal::string(&see_also);
let see_also = Literal::string(see_also);
quote!(#see_also)
})
.collect();
Expand Down

0 comments on commit 72c6ce6

Please sign in to comment.