File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,8 @@ macro_rules! impl_prime_field_serializer {
1313 }
1414
1515 // Calculate the number of bytes required to represent a field element
16- // serialized with `flags`. If `F::BIT_SIZE < 8`,
17- // this is at most `$byte_size + 1`
18- let output_byte_size = buffer_byte_size( P :: MODULUS_BITS as usize + F :: BIT_SIZE ) ;
16+ // serialized with `flags`.
17+ let output_byte_size = Self :: zero( ) . serialized_size_with_flags:: <F >( ) ;
1918
2019 // Write out `self` to a temporary buffer.
2120 // The size of the buffer is $byte_size + 1 because `F::BIT_SIZE`
Original file line number Diff line number Diff line change @@ -51,12 +51,8 @@ impl Flags for EmptyFlags {
5151 }
5252
5353 #[ inline]
54- fn from_u8 ( value : u8 ) -> Option < Self > {
55- if ( value >> 7 ) == 0 {
56- Some ( EmptyFlags )
57- } else {
58- None
59- }
54+ fn from_u8 ( _: u8 ) -> Option < Self > {
55+ Some ( EmptyFlags )
6056 }
6157}
6258
You can’t perform that action at this time.
0 commit comments