@@ -6,7 +6,6 @@ use proc_macro2::{Ident, Literal, Span, TokenStream};
66use pulldown_cmark:: { Event , Parser , Tag , TagEnd } ;
77use quote:: quote;
88use std:: collections:: BTreeMap ;
9- use std:: path:: PathBuf ;
109use xtask:: * ;
1110
1211/// Configuration for a tool that produces rules
@@ -26,11 +25,13 @@ impl ToolConfig {
2625 }
2726
2827 /// Derived: Crate name that contains the rules
28+ #[ allow( dead_code) ]
2929 fn crate_name ( & self ) -> String {
3030 format ! ( "pgls_{}" , self . name)
3131 }
3232
3333 /// Derived: The main struct name (Rules, Actions, or Transformations)
34+ #[ allow( dead_code) ]
3435 fn struct_name ( & self ) -> & str {
3536 match self . category {
3637 RuleCategory :: Lint => "Rules" ,
@@ -230,7 +231,7 @@ fn generate_lint_mod_file(tool: &ToolConfig) -> String {
230231
231232/// Generate the rules.rs file for a Lint tool
232233fn generate_lint_rules_file (
233- tool : & ToolConfig ,
234+ _tool : & ToolConfig ,
234235 groups : BTreeMap < & ' static str , BTreeMap < & ' static str , RuleMetadata > > ,
235236) -> Result < String > {
236237 let mut struct_groups = Vec :: with_capacity ( groups. len ( ) ) ;
@@ -448,7 +449,7 @@ fn generate_lint_rules_file(
448449 }
449450 } ;
450451
451- Ok ( xtask:: reformat ( rules_struct_content. to_string ( ) ) ? )
452+ xtask:: reformat ( rules_struct_content. to_string ( ) )
452453}
453454
454455/// Generate a group struct for lint rules
@@ -664,13 +665,13 @@ fn extract_summary_from_docs(docs: &str) -> String {
664665 }
665666 Event :: Start ( tag) => match tag {
666667 Tag :: Strong | Tag :: Paragraph => continue ,
667- _ => panic ! ( "Unimplemented tag {:?}" , tag ) ,
668+ _ => panic ! ( "Unimplemented tag {tag :?}" ) ,
668669 } ,
669670 Event :: End ( tag) => match tag {
670671 TagEnd :: Strong | TagEnd :: Paragraph => continue ,
671- _ => panic ! ( "Unimplemented tag {:?}" , tag ) ,
672+ _ => panic ! ( "Unimplemented tag {tag :?}" ) ,
672673 } ,
673- _ => panic ! ( "Unimplemented event {:?}" , event ) ,
674+ _ => panic ! ( "Unimplemented event {event :?}" ) ,
674675 }
675676 }
676677
@@ -756,7 +757,7 @@ fn generate_action_mod_file(tool: &ToolConfig) -> String {
756757
757758/// Generate the actions.rs file for an Action tool
758759fn generate_action_actions_file (
759- tool : & ToolConfig ,
760+ _tool : & ToolConfig ,
760761 groups : BTreeMap < & ' static str , BTreeMap < & ' static str , RuleMetadata > > ,
761762) -> Result < String > {
762763 let mut struct_groups = Vec :: with_capacity ( groups. len ( ) ) ;
@@ -905,7 +906,7 @@ fn generate_action_actions_file(
905906 }
906907 } ;
907908
908- Ok ( xtask:: reformat ( actions_struct_content. to_string ( ) ) ? )
909+ xtask:: reformat ( actions_struct_content. to_string ( ) )
909910}
910911
911912/// Generate a group struct for action rules
0 commit comments