@@ -65,7 +65,7 @@ impl fmt::Display for Signature {
6565impl str:: FromStr for Signature {
6666 type Err = Error ;
6767 fn from_str ( s : & str ) -> Result < Signature , Error > {
68- let mut res = [ 0 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
68+ let mut res = [ 0u8 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
6969 match from_hex ( s, & mut res) {
7070 Ok ( constants:: SCHNORRSIG_SIGNATURE_SIZE ) => {
7171 Signature :: from_slice ( & res[ 0 ..constants:: SCHNORRSIG_SIGNATURE_SIZE ] )
@@ -102,7 +102,7 @@ impl fmt::Display for PublicKey {
102102impl str:: FromStr for PublicKey {
103103 type Err = Error ;
104104 fn from_str ( s : & str ) -> Result < PublicKey , Error > {
105- let mut res = [ 0 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
105+ let mut res = [ 0u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
106106 match from_hex ( s, & mut res) {
107107 Ok ( constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ) => {
108108 PublicKey :: from_slice ( & res[ 0 ..constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] )
@@ -118,7 +118,7 @@ impl Signature {
118118 pub fn from_slice ( data : & [ u8 ] ) -> Result < Signature , Error > {
119119 match data. len ( ) {
120120 constants:: SCHNORRSIG_SIGNATURE_SIZE => {
121- let mut ret = [ 0 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
121+ let mut ret = [ 0u8 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
122122 ret[ ..] . copy_from_slice ( data) ;
123123 Ok ( Signature ( ret) )
124124 }
@@ -183,7 +183,7 @@ impl KeyPair {
183183 /// Creates a Schnorr KeyPair directly from a secret key string
184184 #[ inline]
185185 pub fn from_seckey_str < C : Signing > ( secp : & Secp256k1 < C > , s : & str ) -> Result < KeyPair , Error > {
186- let mut res = [ 0 ; constants:: SECRET_KEY_SIZE ] ;
186+ let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
187187 match from_hex ( s, & mut res) {
188188 Ok ( constants:: SECRET_KEY_SIZE ) => {
189189 KeyPair :: from_seckey_slice ( secp, & res[ 0 ..constants:: SECRET_KEY_SIZE ] )
@@ -304,7 +304,7 @@ impl PublicKey {
304304 /// the y-coordinate is represented by only a single bit, as x determines
305305 /// it up to one bit.
306306 pub fn serialize ( & self ) -> [ u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] {
307- let mut ret = [ 0 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
307+ let mut ret = [ 0u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
308308
309309 unsafe {
310310 let err = ffi:: secp256k1_xonly_pubkey_serialize (
@@ -612,7 +612,7 @@ mod tests {
612612
613613 macro_rules! hex_32 {
614614 ( $hex: expr) => { {
615- let mut result = [ 0 ; 32 ] ;
615+ let mut result = [ 0u8 ; 32 ] ;
616616 from_hex( $hex, & mut result) . expect( "valid hex string" ) ;
617617 result
618618 } } ;
@@ -625,7 +625,7 @@ mod tests {
625625
626626 let mut rng = thread_rng ( ) ;
627627 let ( seckey, pubkey) = secp. generate_schnorrsig_keypair ( & mut rng) ;
628- let mut msg = [ 0 ; 32 ] ;
628+ let mut msg = [ 0u8 ; 32 ] ;
629629
630630 for _ in 0 ..100 {
631631 rng. fill_bytes ( & mut msg) ;
@@ -640,7 +640,7 @@ mod tests {
640640 #[ test]
641641 fn test_schnorrsig_sign_with_aux_rand_verify ( ) {
642642 test_schnorrsig_sign_helper ( |secp, msg, seckey, rng| {
643- let mut aux_rand = [ 0 ; 32 ] ;
643+ let mut aux_rand = [ 0u8 ; 32 ] ;
644644 rng. fill_bytes ( & mut aux_rand) ;
645645 secp. schnorrsig_sign_with_aux_rand ( msg, seckey, & aux_rand)
646646 } )
@@ -863,7 +863,7 @@ mod tests {
863863
864864 let msg = Message :: from_slice ( & [ 1 ; 32 ] ) . unwrap ( ) ;
865865 let keypair = KeyPair :: from_seckey_slice ( & s, & [ 2 ; 32 ] ) . unwrap ( ) ;
866- let aux = [ 3 ; 32 ] ;
866+ let aux = [ 3u8 ; 32 ] ;
867867 let sig = s
868868 . schnorrsig_sign_with_aux_rand ( & msg, & keypair, & aux) ;
869869 static SIG_BYTES : [ u8 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] = [
0 commit comments