From 37fbd3a41acb18e6424d607558ba58e2806c0173 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 27 Mar 2024 12:14:50 +0100 Subject: [PATCH] Run `rustfmt` on `sign/type_resolver.rs` --- lightning/src/sign/type_resolver.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lightning/src/sign/type_resolver.rs b/lightning/src/sign/type_resolver.rs index 2a122da34..fad8c0ac9 100644 --- a/lightning/src/sign/type_resolver.rs +++ b/lightning/src/sign/type_resolver.rs @@ -1,14 +1,20 @@ -use core::ops::Deref; use crate::sign::{ChannelSigner, SignerProvider}; +use core::ops::Deref; -pub(crate) enum ChannelSignerType where SP::Target: SignerProvider { +pub(crate) enum ChannelSignerType +where + SP::Target: SignerProvider, +{ // in practice, this will only ever be an EcdsaChannelSigner (specifically, Writeable) Ecdsa(::EcdsaSigner), #[cfg(taproot)] Taproot(::TaprootSigner), } -impl ChannelSignerType where SP::Target: SignerProvider { +impl ChannelSignerType +where + SP::Target: SignerProvider, +{ pub(crate) fn as_ref(&self) -> &dyn ChannelSigner { match self { ChannelSignerType::Ecdsa(ecs) => ecs, @@ -29,15 +35,17 @@ impl ChannelSignerType where SP::Target: SignerProvider { pub(crate) fn as_ecdsa(&self) -> Option<&::EcdsaSigner> { match self { ChannelSignerType::Ecdsa(ecs) => Some(ecs), - _ => None + _ => None, } } #[allow(unused)] - pub(crate) fn as_mut_ecdsa(&mut self) -> Option<&mut ::EcdsaSigner> { + pub(crate) fn as_mut_ecdsa( + &mut self, + ) -> Option<&mut ::EcdsaSigner> { match self { ChannelSignerType::Ecdsa(ecs) => Some(ecs), - _ => None + _ => None, } } } -- 2.39.5