@@ -347,11 +347,11 @@ pub fn split_u128(a: u128) -> (u64, u64) {
347347#[ macro_export]
348348macro_rules! construct_uint {
349349 ( $( #[ $attr: meta] ) * $visibility: vis struct $name: ident ( 1 ) ; ) => {
350- construct_uint!{ @construct $( $attr) * $visibility struct $name ( 1 ) ; }
350+ construct_uint!{ @construct $( # [ $attr] ) * $visibility struct $name ( 1 ) ; }
351351 } ;
352352
353353 ( $( #[ $attr: meta] ) * $visibility: vis struct $name: ident ( $n_words: tt ) ; ) => {
354- construct_uint! { @construct $( $attr) * $visibility struct $name ( $n_words) ; }
354+ construct_uint! { @construct $( # [ $attr] ) * $visibility struct $name ( $n_words) ; }
355355
356356 impl $crate:: core_:: convert:: From <u128 > for $name {
357357 fn from( value: u128 ) -> $name {
@@ -387,7 +387,7 @@ macro_rules! construct_uint {
387387 #[ inline]
388388 pub fn as_u128( & self ) -> u128 {
389389 let & $name( ref arr) = self ;
390- for i in ( 2 ..$n_words) {
390+ for i in 2 ..$n_words {
391391 if arr[ i] != 0 {
392392 panic!( "Integer overflow when casting to u128" )
393393 }
@@ -464,7 +464,7 @@ macro_rules! construct_uint {
464464 pub fn as_u32( & self ) -> u32 {
465465 let & $name( ref arr) = self ;
466466 if ( arr[ 0 ] & ( 0xffffffffu64 << 32 ) ) != 0 {
467- panic!( "Integer overflow when casting to u64 " )
467+ panic!( "Integer overflow when casting to u32 " )
468468 }
469469 self . as_u64( ) as u32
470470 }
@@ -890,7 +890,7 @@ macro_rules! construct_uint {
890890 impl_map_from!( $name, i32 , i64 ) ;
891891 impl_map_from!( $name, isize , i64 ) ;
892892
893- // Converts from big endian representation of $name
893+ // Converts from big endian representation.
894894 impl <' a> $crate:: core_:: convert:: From <& ' a [ u8 ] > for $name {
895895 fn from( bytes: & [ u8 ] ) -> $name {
896896 Self :: from_big_endian( bytes)
0 commit comments