From: Elias Rohrer Date: Wed, 27 Mar 2024 11:14:50 +0000 (+0100) Subject: Run `rustfmt` on `sign/type_resolver.rs` X-Git-Tag: v0.0.123-beta~13^2~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=37fbd3a41acb18e6424d607558ba58e2806c0173;p=rust-lightning Run `rustfmt` on `sign/type_resolver.rs` --- 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, } } }