@@ -61,9 +61,6 @@ macro_rules! create_config {
6161 #[ derive( Clone ) ]
6262 #[ allow( unreachable_pub) ]
6363 pub struct Config {
64- // if a license_template_path has been specified, successfully read, parsed and compiled
65- // into a regex, it will be stored here
66- pub license_template: Option <Regex >,
6764 // For each config item, we store a bool indicating whether it has
6865 // been accessed and the value, and a bool whether the option was
6966 // manually initialised, or taken from the default,
@@ -104,7 +101,6 @@ macro_rules! create_config {
104101 | "struct_variant_width"
105102 | "array_width"
106103 | "chain_width" => self . 0 . set_heuristics( ) ,
107- "license_template_path" => self . 0 . set_license_template( ) ,
108104 "merge_imports" => self . 0 . set_merge_imports( ) ,
109105 & _ => ( ) ,
110106 }
@@ -163,7 +159,6 @@ macro_rules! create_config {
163159 }
164160 ) +
165161 self . set_heuristics( ) ;
166- self . set_license_template( ) ;
167162 self . set_ignore( dir) ;
168163 self . set_merge_imports( ) ;
169164 self
@@ -247,7 +242,6 @@ macro_rules! create_config {
247242 | "struct_variant_width"
248243 | "array_width"
249244 | "chain_width" => self . set_heuristics( ) ,
250- "license_template_path" => self . set_license_template( ) ,
251245 "merge_imports" => self . set_merge_imports( ) ,
252246 & _ => ( ) ,
253247 }
@@ -386,21 +380,6 @@ macro_rules! create_config {
386380 } ;
387381 }
388382
389- fn set_license_template( & mut self ) {
390- if self . was_set( ) . license_template_path( ) {
391- let lt_path = self . license_template_path( ) ;
392- if lt_path. len( ) > 0 {
393- match license:: load_and_compile_template( & lt_path) {
394- Ok ( re) => self . license_template = Some ( re) ,
395- Err ( msg) => eprintln!( "Warning for license template file {:?}: {}" ,
396- lt_path, msg) ,
397- }
398- } else {
399- self . license_template = None ;
400- }
401- }
402- }
403-
404383 fn set_ignore( & mut self , dir: & Path ) {
405384 self . ignore. 2 . add_prefix( dir) ;
406385 }
@@ -437,7 +416,6 @@ macro_rules! create_config {
437416 impl Default for Config {
438417 fn default ( ) -> Config {
439418 Config {
440- license_template: None ,
441419 $(
442420 $i: ( Cell :: new( false ) , false , $def, $stb) ,
443421 ) +
0 commit comments