File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
- use core:: ops:: Deref ;
2
1
use crate :: sign:: { ChannelSigner , SignerProvider } ;
2
+ use core:: ops:: Deref ;
3
3
4
- pub ( crate ) enum ChannelSignerType < SP : Deref > where SP :: Target : SignerProvider {
4
+ pub ( crate ) enum ChannelSignerType < SP : Deref >
5
+ where
6
+ SP :: Target : SignerProvider ,
7
+ {
5
8
// in practice, this will only ever be an EcdsaChannelSigner (specifically, Writeable)
6
9
Ecdsa ( <SP :: Target as SignerProvider >:: EcdsaSigner ) ,
7
10
#[ cfg( taproot) ]
8
11
Taproot ( <SP :: Target as SignerProvider >:: TaprootSigner ) ,
9
12
}
10
13
11
- impl < SP : Deref > ChannelSignerType < SP > where SP :: Target : SignerProvider {
14
+ impl < SP : Deref > ChannelSignerType < SP >
15
+ where
16
+ SP :: Target : SignerProvider ,
17
+ {
12
18
pub ( crate ) fn as_ref ( & self ) -> & dyn ChannelSigner {
13
19
match self {
14
20
ChannelSignerType :: Ecdsa ( ecs) => ecs,
@@ -29,15 +35,17 @@ impl<SP: Deref> ChannelSignerType<SP> where SP::Target: SignerProvider {
29
35
pub ( crate ) fn as_ecdsa ( & self ) -> Option < & <SP :: Target as SignerProvider >:: EcdsaSigner > {
30
36
match self {
31
37
ChannelSignerType :: Ecdsa ( ecs) => Some ( ecs) ,
32
- _ => None
38
+ _ => None ,
33
39
}
34
40
}
35
41
36
42
#[ allow( unused) ]
37
- pub ( crate ) fn as_mut_ecdsa ( & mut self ) -> Option < & mut <SP :: Target as SignerProvider >:: EcdsaSigner > {
43
+ pub ( crate ) fn as_mut_ecdsa (
44
+ & mut self ,
45
+ ) -> Option < & mut <SP :: Target as SignerProvider >:: EcdsaSigner > {
38
46
match self {
39
47
ChannelSignerType :: Ecdsa ( ecs) => Some ( ecs) ,
40
- _ => None
48
+ _ => None ,
41
49
}
42
50
}
43
51
}
You can’t perform that action at this time.
0 commit comments