File tree 3 files changed +8
-8
lines changed
substrate/primitives/application-crypto/src
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ impl RuntimePublic for Public {
52
52
}
53
53
54
54
fn verify < M : AsRef < [ u8 ] > > ( & self , msg : & M , signature : & Self :: Signature ) -> bool {
55
- let sig = AppSignature :: from ( signature. clone ( ) ) ;
56
- let pub_key = AppPublic :: from ( self . clone ( ) ) ;
55
+ let sig = AppSignature :: from ( * signature) ;
56
+ let pub_key = AppPublic :: from ( * self ) ;
57
57
<AppPublic as CryptoType >:: Pair :: verify ( & sig, msg. as_ref ( ) , & pub_key)
58
58
}
59
59
@@ -64,8 +64,8 @@ impl RuntimePublic for Public {
64
64
}
65
65
66
66
fn verify_pop ( & self , pop : & Self :: Signature ) -> bool {
67
- let pop = AppSignature :: from ( pop. clone ( ) ) ;
68
- let pub_key = AppPublic :: from ( self . clone ( ) ) ;
67
+ let pop = AppSignature :: from ( * pop) ;
68
+ let pub_key = AppPublic :: from ( * self ) ;
69
69
<AppPublic as CryptoType >:: Pair :: verify_proof_of_possession ( & pop, & pub_key)
70
70
}
71
71
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ impl RuntimePublic for Public {
61
61
}
62
62
63
63
fn verify_pop ( & self , pop : & Self :: Signature ) -> bool {
64
- let pop = AppSignature :: from ( pop. clone ( ) ) ;
65
- let pub_key = AppPublic :: from ( self . clone ( ) ) ;
64
+ let pop = AppSignature :: from ( * pop) ;
65
+ let pub_key = AppPublic :: from ( * self ) ;
66
66
<AppPublic as CryptoType >:: Pair :: verify_proof_of_possession ( & pop, & pub_key)
67
67
}
68
68
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ impl RuntimePublic for Public {
78
78
}
79
79
80
80
fn verify_pop ( & self , pop : & Self :: Signature ) -> bool {
81
- let pop = AppSignature :: from ( pop. clone ( ) ) ;
82
- let pub_key = AppPublic :: from ( self . clone ( ) ) ;
81
+ let pop = AppSignature :: from ( * pop) ;
82
+ let pub_key = AppPublic :: from ( * self ) ;
83
83
<AppPublic as CryptoType >:: Pair :: verify_proof_of_possession ( & pop, & pub_key)
84
84
}
85
85
You can’t perform that action at this time.
0 commit comments