@@ -61,9 +61,6 @@ macro_rules! create_config {
61
61
#[ derive( Clone ) ]
62
62
#[ allow( unreachable_pub) ]
63
63
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 >,
67
64
// For each config item, we store a bool indicating whether it has
68
65
// been accessed and the value, and a bool whether the option was
69
66
// manually initialised, or taken from the default,
@@ -104,7 +101,6 @@ macro_rules! create_config {
104
101
| "struct_variant_width"
105
102
| "array_width"
106
103
| "chain_width" => self . 0 . set_heuristics( ) ,
107
- "license_template_path" => self . 0 . set_license_template( ) ,
108
104
"merge_imports" => self . 0 . set_merge_imports( ) ,
109
105
& _ => ( ) ,
110
106
}
@@ -163,7 +159,6 @@ macro_rules! create_config {
163
159
}
164
160
) +
165
161
self . set_heuristics( ) ;
166
- self . set_license_template( ) ;
167
162
self . set_ignore( dir) ;
168
163
self . set_merge_imports( ) ;
169
164
self
@@ -247,7 +242,6 @@ macro_rules! create_config {
247
242
| "struct_variant_width"
248
243
| "array_width"
249
244
| "chain_width" => self . set_heuristics( ) ,
250
- "license_template_path" => self . set_license_template( ) ,
251
245
"merge_imports" => self . set_merge_imports( ) ,
252
246
& _ => ( ) ,
253
247
}
@@ -386,21 +380,6 @@ macro_rules! create_config {
386
380
} ;
387
381
}
388
382
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
-
404
383
fn set_ignore( & mut self , dir: & Path ) {
405
384
self . ignore. 2 . add_prefix( dir) ;
406
385
}
@@ -437,7 +416,6 @@ macro_rules! create_config {
437
416
impl Default for Config {
438
417
fn default ( ) -> Config {
439
418
Config {
440
- license_template: None ,
441
419
$(
442
420
$i: ( Cell :: new( false ) , false , $def, $stb) ,
443
421
) +
0 commit comments