@@ -478,41 +478,41 @@ mod validate {
478478 }
479479 }
480480
481+ #[ cfg( feature = "attributes" ) ]
481482 pub struct SafeCrlf ;
483+ #[ cfg( feature = "attributes" ) ]
482484 impl keys:: Validate for SafeCrlf {
483- #[ cfg_attr( not( feature = "attributes" ) , allow( unused_variables) ) ]
484485 fn validate ( & self , value : & BStr ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync + ' static > > {
485- #[ cfg( feature = "attributes" ) ]
486486 super :: Core :: SAFE_CRLF . try_into_safecrlf ( value. into ( ) ) ?;
487487 Ok ( ( ) )
488488 }
489489 }
490490
491+ #[ cfg( feature = "attributes" ) ]
491492 pub struct AutoCrlf ;
493+ #[ cfg( feature = "attributes" ) ]
492494 impl keys:: Validate for AutoCrlf {
493- #[ cfg_attr( not( feature = "attributes" ) , allow( unused_variables) ) ]
494495 fn validate ( & self , value : & BStr ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync + ' static > > {
495- #[ cfg( feature = "attributes" ) ]
496496 super :: Core :: AUTO_CRLF . try_into_autocrlf ( value. into ( ) ) ?;
497497 Ok ( ( ) )
498498 }
499499 }
500500
501+ #[ cfg( feature = "attributes" ) ]
501502 pub struct Eol ;
503+ #[ cfg( feature = "attributes" ) ]
502504 impl keys:: Validate for Eol {
503- #[ cfg_attr( not( feature = "attributes" ) , allow( unused_variables) ) ]
504505 fn validate ( & self , value : & BStr ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync + ' static > > {
505- #[ cfg( feature = "attributes" ) ]
506506 super :: Core :: EOL . try_into_eol ( value. into ( ) ) ?;
507507 Ok ( ( ) )
508508 }
509509 }
510510
511+ #[ cfg( feature = "attributes" ) ]
511512 pub struct CheckRoundTripEncoding ;
513+ #[ cfg( feature = "attributes" ) ]
512514 impl keys:: Validate for CheckRoundTripEncoding {
513- #[ cfg_attr( not( feature = "attributes" ) , allow( unused_variables) ) ]
514515 fn validate ( & self , value : & BStr ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync + ' static > > {
515- #[ cfg( feature = "attributes" ) ]
516516 super :: Core :: CHECK_ROUND_TRIP_ENCODING . try_into_encodings ( Some ( value. into ( ) ) ) ?;
517517 Ok ( ( ) )
518518 }
0 commit comments