@@ -20,6 +20,7 @@ mod test {
2020 use std:: process:: Command ;
2121
2222 /// Testing errors for integration tests
23+ #[ allow( dead_code) ]
2324 #[ derive( Debug ) ]
2425 enum IntTestError {
2526 // IO error
@@ -38,11 +39,12 @@ mod test {
3839
3940 // Helper function
4041 // Runs a system command with given args
42+ #[ allow( dead_code) ]
4143 fn run_cmd_with_args ( cmd : & str , args : & [ & str ] ) -> Result < serde_json:: Value , IntTestError > {
4244 let output = Command :: new ( cmd) . args ( args) . output ( ) . unwrap ( ) ;
4345 let mut value = output. stdout ;
4446 let error = output. stderr ;
45- if value. len ( ) == 0 {
47+ if value. is_empty ( ) {
4648 return Err ( IntTestError :: CmdExec ( String :: from_utf8 ( error) . unwrap ( ) ) ) ;
4749 }
4850 value. pop ( ) ; // remove `\n` at end
@@ -56,6 +58,7 @@ mod test {
5658
5759 // Helper Function
5860 // Transforms a json value to string
61+ #[ allow( dead_code) ]
5962 fn value_to_string ( value : & Value ) -> Result < String , IntTestError > {
6063 match value {
6164 Value :: Bool ( bool) => match bool {
@@ -72,6 +75,7 @@ mod test {
7275
7376 // Helper Function
7477 // Extracts value from a given json object and key
78+ #[ allow( dead_code) ]
7579 fn get_value ( json : & Value , key : & str ) -> Result < String , IntTestError > {
7680 let map = json
7781 . as_object ( )
@@ -86,6 +90,7 @@ mod test {
8690
8791 /// The bdk-cli command struct
8892 /// Use it to perform all bdk-cli operations
93+ #[ allow( dead_code) ]
8994 #[ derive( Debug ) ]
9095 struct BdkCli {
9196 target : String ,
@@ -108,10 +113,10 @@ mod test {
108113 let mut feat = "--features=" . to_string ( ) ;
109114 for item in features {
110115 feat. push_str ( item) ;
111- feat. push_str ( "," ) ;
116+ feat. push ( ',' ) ;
112117 }
113118 feat. pop ( ) ; // remove the last comma
114- let _build = Command :: new ( "cargo" ) . args ( & [ "build" , & feat] ) . output ( ) ?;
119+ let _build = Command :: new ( "cargo" ) . args ( [ "build" , & feat] ) . output ( ) ?;
115120
116121 let mut bdk_cli = Self {
117122 target : "./target/debug/bdk-cli" . to_string ( ) ,
@@ -159,7 +164,7 @@ mod test {
159164 wallet_args. push ( "-d" ) ;
160165 wallet_args. push ( self . recv_desc . as_ref ( ) . unwrap ( ) ) ;
161166 wallet_args. push ( "-c" ) ;
162- wallet_args. push ( & self . chang_desc . as_ref ( ) . unwrap ( ) ) ;
167+ wallet_args. push ( self . chang_desc . as_ref ( ) . unwrap ( ) ) ;
163168
164169 for arg in args {
165170 wallet_args. push ( arg) ;
@@ -195,6 +200,7 @@ mod test {
195200
196201 // Run A Basic wallet operation test, with given feature
197202 #[ cfg( test) ]
203+ #[ allow( dead_code) ]
198204 fn basic_wallet_ops ( feature : & str ) {
199205 // Create a temporary directory for testing env
200206 let mut test_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
0 commit comments