@@ -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 ] )
@@ -103,7 +103,7 @@ impl fmt::Display for PublicKey {
103103impl str:: FromStr for PublicKey {
104104 type Err = Error ;
105105 fn from_str ( s : & str ) -> Result < PublicKey , Error > {
106- let mut res = [ 0 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
106+ let mut res = [ 0u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
107107 match from_hex ( s, & mut res) {
108108 Ok ( constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ) => {
109109 PublicKey :: from_slice ( & res[ 0 ..constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] )
@@ -119,7 +119,7 @@ impl Signature {
119119 pub fn from_slice ( data : & [ u8 ] ) -> Result < Signature , Error > {
120120 match data. len ( ) {
121121 constants:: SCHNORRSIG_SIGNATURE_SIZE => {
122- let mut ret = [ 0 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
122+ let mut ret = [ 0u8 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] ;
123123 ret[ ..] . copy_from_slice ( data) ;
124124 Ok ( Signature ( ret) )
125125 }
@@ -184,7 +184,7 @@ impl KeyPair {
184184 /// Creates a Schnorr KeyPair directly from a secret key string
185185 #[ inline]
186186 pub fn from_seckey_str < C : Signing > ( secp : & Secp256k1 < C > , s : & str ) -> Result < KeyPair , Error > {
187- let mut res = [ 0 ; constants:: SECRET_KEY_SIZE ] ;
187+ let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
188188 match from_hex ( s, & mut res) {
189189 Ok ( constants:: SECRET_KEY_SIZE ) => {
190190 KeyPair :: from_seckey_slice ( secp, & res[ 0 ..constants:: SECRET_KEY_SIZE ] )
@@ -305,7 +305,7 @@ impl PublicKey {
305305 /// the y-coordinate is represented by only a single bit, as x determines
306306 /// it up to one bit.
307307 pub fn serialize ( & self ) -> [ u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] {
308- let mut ret = [ 0 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
308+ let mut ret = [ 0u8 ; constants:: SCHNORRSIG_PUBLIC_KEY_SIZE ] ;
309309
310310 unsafe {
311311 let err = ffi:: secp256k1_xonly_pubkey_serialize (
@@ -613,7 +613,7 @@ mod tests {
613613
614614 macro_rules! hex_32 {
615615 ( $hex: expr) => { {
616- let mut result = [ 0 ; 32 ] ;
616+ let mut result = [ 0u8 ; 32 ] ;
617617 from_hex( $hex, & mut result) . expect( "valid hex string" ) ;
618618 result
619619 } } ;
@@ -626,7 +626,7 @@ mod tests {
626626
627627 let mut rng = thread_rng ( ) ;
628628 let ( seckey, pubkey) = secp. generate_schnorrsig_keypair ( & mut rng) ;
629- let mut msg = [ 0 ; 32 ] ;
629+ let mut msg = [ 0u8 ; 32 ] ;
630630
631631 for _ in 0 ..100 {
632632 rng. fill_bytes ( & mut msg) ;
@@ -641,7 +641,7 @@ mod tests {
641641 #[ test]
642642 fn test_schnorrsig_sign_with_aux_rand_verify ( ) {
643643 test_schnorrsig_sign_helper ( |secp, msg, seckey, rng| {
644- let mut aux_rand = [ 0 ; 32 ] ;
644+ let mut aux_rand = [ 0u8 ; 32 ] ;
645645 rng. fill_bytes ( & mut aux_rand) ;
646646 secp. schnorrsig_sign_with_aux_rand ( msg, seckey, & aux_rand)
647647 } )
@@ -864,7 +864,7 @@ mod tests {
864864
865865 let msg = Message :: from_slice ( & [ 1 ; 32 ] ) . unwrap ( ) ;
866866 let keypair = KeyPair :: from_seckey_slice ( & s, & [ 2 ; 32 ] ) . unwrap ( ) ;
867- let aux = [ 3 ; 32 ] ;
867+ let aux = [ 3u8 ; 32 ] ;
868868 let sig = s
869869 . schnorrsig_sign_with_aux_rand ( & msg, & keypair, & aux) ;
870870 static SIG_BYTES : [ u8 ; constants:: SCHNORRSIG_SIGNATURE_SIZE ] = [
0 commit comments