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 77//! unable to run on platforms without allocator. We implement a special type to encapsulate
88//! serialized signatures and since it's a bit more complicated it has its own module.
99
10+ use core:: borrow:: Borrow ;
1011use core:: { fmt, ops} ;
1112
1213pub use into_iter:: IntoIter ;
@@ -41,11 +42,30 @@ impl PartialEq for SerializedSignature {
4142 fn eq ( & self , other : & SerializedSignature ) -> bool { * * self == * * other }
4243}
4344
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+
4459impl AsRef < [ u8 ] > for SerializedSignature {
4560 #[ inline]
4661 fn as_ref ( & self ) -> & [ u8 ] { self }
4762}
4863
64+ impl Borrow < [ u8 ] > for SerializedSignature {
65+ #[ inline]
66+ fn borrow ( & self ) -> & [ u8 ] { self }
67+ }
68+
4969impl ops:: Deref for SerializedSignature {
5070 type Target = [ u8 ] ;
5171
You can’t perform that action at this time.
0 commit comments