File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 7
7
//! unable to run on platforms without allocator. We implement a special type to encapsulate
8
8
//! serialized signatures and since it's a bit more complicated it has its own module.
9
9
10
+ use core:: borrow:: Borrow ;
10
11
use core:: { fmt, ops} ;
11
12
12
13
pub use into_iter:: IntoIter ;
@@ -41,11 +42,30 @@ impl PartialEq for SerializedSignature {
41
42
fn eq ( & self , other : & SerializedSignature ) -> bool { * * self == * * other }
42
43
}
43
44
45
+ impl PartialEq < [ u8 ] > for SerializedSignature {
46
+ #[ inline]
47
+ fn eq ( & self , other : & [ u8 ] ) -> bool { * * self == * other }
48
+ }
49
+
50
+ impl PartialEq < SerializedSignature > for [ u8 ] {
51
+ #[ inline]
52
+ fn eq ( & self , other : & SerializedSignature ) -> bool { * self == * * other }
53
+ }
54
+
55
+ impl core:: hash:: Hash for SerializedSignature {
56
+ fn hash < H : core:: hash:: Hasher > ( & self , state : & mut H ) { ( * * self ) . hash ( state) }
57
+ }
58
+
44
59
impl AsRef < [ u8 ] > for SerializedSignature {
45
60
#[ inline]
46
61
fn as_ref ( & self ) -> & [ u8 ] { self }
47
62
}
48
63
64
+ impl Borrow < [ u8 ] > for SerializedSignature {
65
+ #[ inline]
66
+ fn borrow ( & self ) -> & [ u8 ] { self }
67
+ }
68
+
49
69
impl ops:: Deref for SerializedSignature {
50
70
type Target = [ u8 ] ;
51
71
You can’t perform that action at this time.
0 commit comments