File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -24,32 +24,48 @@ pub trait SerializableSecret<T> {
2424}
2525
2626impl < T : Serialize > SerializableSecret < T > for & Secret < T > {
27- type Exposed < ' a > = & ' a T where T : ' a , Self : ' a ;
27+ type Exposed < ' a >
28+ = & ' a T
29+ where
30+ T : ' a ,
31+ Self : ' a ;
2832
2933 fn expose_via ( & self , expose : impl Fn ( & Secret < T > ) -> & T ) -> Self :: Exposed < ' _ > {
3034 expose ( self )
3135 }
3236}
3337
3438impl < T : Serialize > SerializableSecret < T > for Secret < T > {
35- type Exposed < ' a > = & ' a T where T : ' a ;
39+ type Exposed < ' a >
40+ = & ' a T
41+ where
42+ T : ' a ;
3643
3744 fn expose_via ( & self , expose : impl Fn ( & Secret < T > ) -> & T ) -> Self :: Exposed < ' _ > {
3845 expose ( self )
3946 }
4047}
4148
4249impl < T : Serialize > SerializableSecret < T > for Option < Secret < T > > {
43- type Exposed < ' a > = Option < & ' a T > where T : ' a ;
50+ type Exposed < ' a >
51+ = Option < & ' a T >
52+ where
53+ T : ' a ;
4454
4555 fn expose_via ( & self , expose : impl Fn ( & Secret < T > ) -> & T ) -> Self :: Exposed < ' _ > {
4656 self . as_ref ( ) . map ( expose)
4757 }
4858}
4959
5060#[ cfg( feature = "std" ) ]
51- impl < T : Serialize > SerializableSecret < T > for Vec < Secret < T > > where for < ' a > Vec < & ' a T > : Serialize {
52- type Exposed < ' a > = Vec < & ' a T > where T : ' a ;
61+ impl < T : Serialize > SerializableSecret < T > for Vec < Secret < T > >
62+ where
63+ for < ' a > Vec < & ' a T > : Serialize ,
64+ {
65+ type Exposed < ' a >
66+ = Vec < & ' a T >
67+ where
68+ T : ' a ;
5369
5470 fn expose_via ( & self , expose : impl Fn ( & Secret < T > ) -> & T ) -> Self :: Exposed < ' _ > {
5571 self . iter ( ) . map ( expose) . collect ( )
You can’t perform that action at this time.
0 commit comments