File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
3
3
name = " secp256k1"
4
- version = " 0.16.0 "
4
+ version = " 0.16.1 "
5
5
authors = [ " Dawid Ciężarkiewicz <dpc@ucore.info>" ,
6
6
" Andrew Poelstra <apoelstra@wpsoftware.net>" ]
7
7
license = " CC0-1.0"
@@ -65,4 +65,4 @@ name = "sign_verify"
65
65
66
66
[[example ]]
67
67
name = " generate_keys"
68
- required-features = [" rand" ]
68
+ required-features = [" rand" ]
Original file line number Diff line number Diff line change @@ -619,13 +619,13 @@ mod test {
619
619
fn next_u64 ( & mut self ) -> u64 {
620
620
self . next_u32 ( ) as u64
621
621
}
622
- fn try_fill_bytes ( & mut self , _dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
623
- Err ( Error :: new ( ErrorKind :: Unavailable , "not implemented" ) )
624
- }
625
-
626
622
fn fill_bytes ( & mut self , dest : & mut [ u8 ] ) {
627
623
impls:: fill_bytes_via_next ( self , dest) ;
628
624
}
625
+
626
+ fn try_fill_bytes ( & mut self , _dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
627
+ Err ( Error :: new ( ErrorKind :: Unavailable , "not implemented" ) )
628
+ }
629
629
}
630
630
631
631
let s = Secp256k1 :: new ( ) ;
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ impl SerializedSignature {
247
247
pub fn from_signature ( sig : & Signature ) -> SerializedSignature {
248
248
sig. serialize_der ( )
249
249
}
250
+
251
+ /// Check if the space is zero.
252
+ pub fn is_empty ( & self ) -> bool { self . len ( ) == 0 }
250
253
}
251
254
252
255
impl Signature {
@@ -548,7 +551,7 @@ impl Default for SerializedSignature {
548
551
549
552
impl PartialEq for SerializedSignature {
550
553
fn eq ( & self , other : & SerializedSignature ) -> bool {
551
- & self . data [ ..self . len ] == & other. data [ ..other. len ]
554
+ self . data [ ..self . len ] == other. data [ ..other. len ]
552
555
}
553
556
}
554
557
Original file line number Diff line number Diff line change @@ -147,9 +147,9 @@ macro_rules! impl_pretty_debug {
147
147
( $thing: ident) => {
148
148
impl :: core:: fmt:: Debug for $thing {
149
149
fn fmt( & self , f: & mut :: core:: fmt:: Formatter ) -> :: core:: fmt:: Result {
150
- try! ( write!( f, "{}(" , stringify!( $thing) ) ) ;
150
+ write!( f, "{}(" , stringify!( $thing) ) ? ;
151
151
for i in self [ ..] . iter( ) . cloned( ) {
152
- try! ( write!( f, "{:02x}" , i) ) ;
152
+ write!( f, "{:02x}" , i) ? ;
153
153
}
154
154
write!( f, ")" )
155
155
}
@@ -162,7 +162,7 @@ macro_rules! impl_raw_debug {
162
162
impl :: core:: fmt:: Debug for $thing {
163
163
fn fmt( & self , f: & mut :: core:: fmt:: Formatter ) -> :: core:: fmt:: Result {
164
164
for i in self [ ..] . iter( ) . cloned( ) {
165
- try! ( write!( f, "{:02x}" , i) ) ;
165
+ write!( f, "{:02x}" , i) ? ;
166
166
}
167
167
Ok ( ( ) )
168
168
}
You can’t perform that action at this time.
0 commit comments