From 5235d9df0477afcfeee0c9a238e3cfda76fc743a Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Wed, 16 Jul 2025 14:28:26 +0100 Subject: [PATCH] chore: run `cargo-fmt` I don't know when the formatting changed :thinking: --- src/serde.rs | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/serde.rs b/src/serde.rs index 56edf9b..df967c9 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -24,7 +24,11 @@ pub trait SerializableSecret { } impl SerializableSecret for &Secret { - type Exposed<'a> = &'a T where T: 'a, Self: 'a; + type Exposed<'a> + = &'a T + where + T: 'a, + Self: 'a; fn expose_via(&self, expose: impl Fn(&Secret) -> &T) -> Self::Exposed<'_> { expose(self) @@ -32,7 +36,10 @@ impl SerializableSecret for &Secret { } impl SerializableSecret for Secret { - type Exposed<'a> = &'a T where T: 'a; + type Exposed<'a> + = &'a T + where + T: 'a; fn expose_via(&self, expose: impl Fn(&Secret) -> &T) -> Self::Exposed<'_> { expose(self) @@ -40,7 +47,10 @@ impl SerializableSecret for Secret { } impl SerializableSecret for Option> { - type Exposed<'a> = Option<&'a T> where T: 'a; + type Exposed<'a> + = Option<&'a T> + where + T: 'a; fn expose_via(&self, expose: impl Fn(&Secret) -> &T) -> Self::Exposed<'_> { self.as_ref().map(expose) @@ -48,8 +58,14 @@ impl SerializableSecret for Option> { } #[cfg(feature = "std")] -impl SerializableSecret for Vec> where for<'a> Vec<&'a T>: Serialize { - type Exposed<'a> = Vec<&'a T> where T: 'a; +impl SerializableSecret for Vec> +where + for<'a> Vec<&'a T>: Serialize, +{ + type Exposed<'a> + = Vec<&'a T> + where + T: 'a; fn expose_via(&self, expose: impl Fn(&Secret) -> &T) -> Self::Exposed<'_> { self.iter().map(expose).collect()