@@ -55,12 +55,13 @@ use super::telemetry::{telemetry_report_event, DeveloperUsageDigest, DeveloperUs
5555/// For Clarinet documentation, refer to https://docs.hiro.so/clarinet/introduction.
5656/// Report any issues here https://github.com/hirosystems/clarinet/issues/new.
5757#[ derive( Parser , PartialEq , Clone , Debug ) ]
58- #[ clap( version = option_env !( "CARGO_PKG_VERSION" ) . expect ( "Unable to detect version ") , name = "clarinet" , bin_name = "clarinet" ) ]
58+ #[ clap( version = env !( "CARGO_PKG_VERSION" ) , name = "clarinet" , bin_name = "clarinet" ) ]
5959struct Opts {
6060 #[ clap( subcommand) ]
6161 command : Command ,
6262}
6363
64+ #[ allow( clippy:: upper_case_acronyms) ]
6465#[ derive( Subcommand , PartialEq , Clone , Debug ) ]
6566enum Command {
6667 /// Create and scaffold a new project
@@ -123,6 +124,7 @@ enum Requirements {
123124 AddRequirement ( AddRequirement ) ,
124125}
125126
127+ #[ allow( clippy:: enum_variant_names) ]
126128#[ derive( Subcommand , PartialEq , Clone , Debug ) ]
127129#[ clap( bin_name = "deployment" , aliases = & [ "deployment" ] ) ]
128130enum Deployments {
@@ -137,6 +139,7 @@ enum Deployments {
137139 ApplyDeployment ( ApplyDeployment ) ,
138140}
139141
142+ #[ allow( clippy:: enum_variant_names) ]
140143#[ derive( Subcommand , PartialEq , Clone , Debug ) ]
141144#[ clap( bin_name = "chainhook" , aliases = & [ "chainhook" ] ) ]
142145enum Chainhooks {
@@ -663,7 +666,7 @@ pub fn main() {
663666 #[ cfg( feature = "telemetry" ) ]
664667 telemetry_report_event ( DeveloperUsageEvent :: NewProject ( DeveloperUsageDigest :: new (
665668 & project_opts. name ,
666- & vec ! [ ] ,
669+ & [ ] ,
667670 ) ) ) ;
668671 }
669672 }
@@ -834,9 +837,9 @@ pub fn main() {
834837 println ! ( "{}" , yellow!( "Continue [Y/n]?" ) ) ;
835838 let mut buffer = String :: new ( ) ;
836839 std:: io:: stdin ( ) . read_line ( & mut buffer) . unwrap ( ) ;
837- if !buffer. starts_with ( "Y" )
838- && !buffer. starts_with ( "y" )
839- && !buffer. starts_with ( " \n " )
840+ if !buffer. starts_with ( 'Y' )
841+ && !buffer. starts_with ( 'y' )
842+ && !buffer. starts_with ( '\n' )
840843 {
841844 println ! ( "Deployment aborted" ) ;
842845 std:: process:: exit ( 1 ) ;
@@ -1154,8 +1157,7 @@ pub fn main() {
11541157 }
11551158
11561159 if success {
1157- println ! ( "{} Syntax of contract successfully checked" , green!( "✔" ) ) ;
1158- return ;
1160+ println ! ( "{} Syntax of contract successfully checked" , green!( "✔" ) )
11591161 } else {
11601162 std:: process:: exit ( 1 ) ;
11611163 }
@@ -1394,9 +1396,8 @@ fn load_manifest_or_exit(path: Option<String>) -> ProjectManifest {
13941396}
13951397
13961398fn load_manifest_or_warn ( path : Option < String > ) -> Option < ProjectManifest > {
1397- let manifest_location = get_manifest_location_or_warn ( path) ;
1398- if manifest_location. is_some ( ) {
1399- let manifest = match ProjectManifest :: from_location ( & manifest_location. unwrap ( ) ) {
1399+ if let Some ( manifest_location) = get_manifest_location_or_warn ( path) {
1400+ let manifest = match ProjectManifest :: from_location ( & manifest_location) {
14001401 Ok ( manifest) => manifest,
14011402 Err ( message) => {
14021403 println ! (
@@ -1584,7 +1585,7 @@ pub fn load_deployment_if_exists(
15841585 println ! ( "{}" , yellow!( "Overwrite? [Y/n]" ) ) ;
15851586 let mut buffer = String :: new ( ) ;
15861587 std:: io:: stdin ( ) . read_line ( & mut buffer) . unwrap ( ) ;
1587- if buffer. starts_with ( "n" ) {
1588+ if buffer. starts_with ( 'n' ) {
15881589 Some ( load_deployment ( manifest, & default_deployment_location) )
15891590 } else {
15901591 default_deployment_location
0 commit comments