]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Run `rustfmt` on `sign/type_resolver.rs`
authorElias Rohrer <dev@tnull.de>
Wed, 27 Mar 2024 11:14:50 +0000 (12:14 +0100)
committerElias Rohrer <dev@tnull.de>
Tue, 9 Apr 2024 11:09:51 +0000 (13:09 +0200)
lightning/src/sign/type_resolver.rs

index 2a122da34470332e1147a427de86c864abe4adab..fad8c0ac96c0689fecfb7858f346aae63afe983c 100644 (file)
@@ -1,14 +1,20 @@
-use core::ops::Deref;
 use crate::sign::{ChannelSigner, SignerProvider};
+use core::ops::Deref;
 
-pub(crate) enum ChannelSignerType<SP: Deref> where SP::Target: SignerProvider {
+pub(crate) enum ChannelSignerType<SP: Deref>
+where
+       SP::Target: SignerProvider,
+{
        // in practice, this will only ever be an EcdsaChannelSigner (specifically, Writeable)
        Ecdsa(<SP::Target as SignerProvider>::EcdsaSigner),
        #[cfg(taproot)]
        Taproot(<SP::Target as SignerProvider>::TaprootSigner),
 }
 
-impl<SP: Deref> ChannelSignerType<SP> where SP::Target: SignerProvider {
+impl<SP: Deref> ChannelSignerType<SP>
+where
+       SP::Target: SignerProvider,
+{
        pub(crate) fn as_ref(&self) -> &dyn ChannelSigner {
                match self {
                        ChannelSignerType::Ecdsa(ecs) => ecs,
@@ -29,15 +35,17 @@ impl<SP: Deref> ChannelSignerType<SP> where SP::Target: SignerProvider {
        pub(crate) fn as_ecdsa(&self) -> Option<&<SP::Target as SignerProvider>::EcdsaSigner> {
                match self {
                        ChannelSignerType::Ecdsa(ecs) => Some(ecs),
-                       _ => None
+                       _ => None,
                }
        }
 
        #[allow(unused)]
-       pub(crate) fn as_mut_ecdsa(&mut self) -> Option<&mut <SP::Target as SignerProvider>::EcdsaSigner> {
+       pub(crate) fn as_mut_ecdsa(
+               &mut self,
+       ) -> Option<&mut <SP::Target as SignerProvider>::EcdsaSigner> {
                match self {
                        ChannelSignerType::Ecdsa(ecs) => Some(ecs),
-                       _ => None
+                       _ => None,
                }
        }
 }