File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 1
1
//! Encoding support.
2
2
3
- use crate :: { Error , Result } ;
3
+ use crate :: Error ;
4
4
5
5
#[ cfg( feature = "alloc" ) ]
6
- use alloc:: { boxed :: Box , vec:: Vec } ;
6
+ use alloc:: vec:: Vec ;
7
7
8
8
/// Support for decoding/encoding signatures as bytes.
9
9
pub trait SignatureEncoding :
@@ -12,11 +12,6 @@ pub trait SignatureEncoding:
12
12
/// Byte representation of a signature.
13
13
type Repr : ' static + AsRef < [ u8 ] > + Clone + Send + Sync ;
14
14
15
- /// Decode signature from its byte representation.
16
- fn from_bytes ( bytes : & Self :: Repr ) -> Result < Self > {
17
- Self :: try_from ( bytes. as_ref ( ) )
18
- }
19
-
20
15
/// Encode signature as its byte representation.
21
16
fn to_bytes ( & self ) -> Self :: Repr {
22
17
self . clone ( ) . into ( )
@@ -28,11 +23,4 @@ pub trait SignatureEncoding:
28
23
fn to_vec ( & self ) -> Vec < u8 > {
29
24
self . to_bytes ( ) . as_ref ( ) . to_vec ( )
30
25
}
31
-
32
- /// Encode the signature as a boxed byte slice.
33
- #[ cfg( feature = "alloc" ) ]
34
- #[ cfg_attr( docsrs, doc( cfg( feature = "alloc" ) ) ) ]
35
- fn to_boxed_slice ( & self ) -> Box < [ u8 ] > {
36
- self . to_vec ( ) . into_boxed_slice ( )
37
- }
38
26
}
You can’t perform that action at this time.
0 commit comments