We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf3bc42 + fe50a50 commit 3c9d88aCopy full SHA for 3c9d88a
lightning/src/ln/mod.rs
@@ -112,9 +112,9 @@ impl core::fmt::Display for PaymentPreimage {
112
}
113
114
/// Converts a `PaymentPreimage` into a `PaymentHash` by hashing the preimage with SHA256.
115
-impl Into<PaymentHash> for PaymentPreimage {
116
- fn into(self) -> PaymentHash {
117
- PaymentHash(Sha256::hash(&self.0).to_byte_array())
+impl From<PaymentPreimage> for PaymentHash {
+ fn from(value: PaymentPreimage) -> Self {
+ PaymentHash(Sha256::hash(&value.0).to_byte_array())
118
119
120
0 commit comments