Skip to content

Commit 69e4514

Browse files
committed
chore: cargo fmt
1 parent 7be5066 commit 69e4514

File tree

14 files changed

+70
-34
lines changed

14 files changed

+70
-34
lines changed

packages/frender-common/src/strings.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ impl<S: 'static + AsRef<str>> IntoStaticStr for SelfIntoStaticStr<S> {
8484
pub struct SelfToAsRefStr<S>(pub S);
8585

8686
impl<S: AsRef<str>> ToAsRefStr for SelfToAsRefStr<S> {
87-
type ToAsRefStr<'a> = &'a S
87+
type ToAsRefStr<'a>
88+
= &'a S
8889
where
8990
Self: 'a;
9091

packages/frender-common/src/temp_str.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ impl<C: PartialEq<S>, S> PartialEq<TempStr<S>> for TempStrIntoStaticStrCache<C>
1313
}
1414

1515
impl<C: ToAsRefStr> ToAsRefStr for TempStrIntoStaticStrCache<C> {
16-
type ToAsRefStr<'a> = C::ToAsRefStr<'a>
16+
type ToAsRefStr<'a>
17+
= C::ToAsRefStr<'a>
1718
where
1819
Self: 'a;
1920

@@ -219,7 +220,8 @@ impl<S: PartialEq<T>, T: ?Sized> PartialEq<&T> for RefToStaticStrCache<S> {
219220
}
220221

221222
impl<S: ToAsRefStr> ToAsRefStr for RefToStaticStrCache<S> {
222-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
223+
type ToAsRefStr<'a>
224+
= S::ToAsRefStr<'a>
223225
where
224226
Self: 'a;
225227

@@ -302,7 +304,8 @@ pub trait ToAsRefStr {
302304
}
303305

304306
impl<'this, T: ?Sized + ToAsRefStr> ToAsRefStr for &'this T {
305-
type ToAsRefStr<'a> = T::ToAsRefStr<'this>
307+
type ToAsRefStr<'a>
308+
= T::ToAsRefStr<'this>
306309
where
307310
Self: 'a;
308311

@@ -321,7 +324,8 @@ crate::impl_many!(
321324
std::sync::Arc<str>,
322325
]
323326
{
324-
type ToAsRefStr<'a> = &'a Self
327+
type ToAsRefStr<'a>
328+
= &'a Self
325329
where
326330
Self: 'a;
327331

packages/frender-dom/src/behaviors.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ mod web {
207207
Renderer: ?Sized + crate::csr::web::Renderer,
208208
> ElementWithStyle<Renderer> for crate::csr::web::Node<N>
209209
{
210-
type Style<'a> = web_sys::CssStyleDeclaration
210+
type Style<'a>
211+
= web_sys::CssStyleDeclaration
211212
where
212213
Self: 'a,
213214
Renderer: 'a;
@@ -222,7 +223,8 @@ mod web {
222223
Renderer: ?Sized + crate::csr::web::Renderer,
223224
> ElementWithClassList<Renderer> for crate::csr::web::Node<N>
224225
{
225-
type ClassList<'a> = web_sys::DomTokenList
226+
type ClassList<'a>
227+
= web_sys::DomTokenList
226228
where
227229
Self: 'a,
228230
Renderer: 'a;
@@ -246,7 +248,8 @@ mod web {
246248
],
247249
)
248250
{
249-
type RelList<'a> = web_sys::DomTokenList
251+
type RelList<'a>
252+
= web_sys::DomTokenList
250253
where
251254
Self: 'a,
252255
Renderer: 'a;

packages/frender-form-control/src/value.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ impl FormControlValueKind for str {
3030
}
3131

3232
impl<T: Copy> FormControlValueKind for T {
33-
type FormControlValue<'a> = T where T: 'a;
33+
type FormControlValue<'a>
34+
= T
35+
where
36+
T: 'a;
3437
}
3538

3639
pub trait FromFormControlValue<VK: ?Sized + FormControlValueKind> {

packages/frender-hook-element/src/hook_element.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ impl<F, HookData> UseHookData for FnMutUseHookData<F, HookData>
5454
where
5555
F: for<'hook> FnMut1<Pin<&'hook mut HookData>>,
5656
{
57-
type Value<'hook> = <F as FnMut1<Pin<&'hook mut HookData>>>::_Output
57+
type Value<'hook>
58+
= <F as FnMut1<Pin<&'hook mut HookData>>>::_Output
5859
where
5960
Self::HookData: 'hook;
6061

packages/frender-html/src/dom_tokens.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ pub(crate) trait HasDomTokensDomApi<BT: BehaviorType> {
3535
}
3636

3737
impl<ET: behavior_type_traits::Element> HasDomTokensDomApi<ET> for prop_markers::Element::class {
38-
type DomTokensDomApi<'a, R: 'a + ?Sized + RenderHtml> = <ET::Element<R> as ElementWithClassList<R>>::ClassList<'a>
38+
type DomTokensDomApi<'a, R: 'a + ?Sized + RenderHtml>
39+
= <ET::Element<R> as ElementWithClassList<R>>::ClassList<'a>
3940
where
4041
ET: 'a;
4142

@@ -48,7 +49,8 @@ impl<ET: behavior_type_traits::Element> HasDomTokensDomApi<ET> for prop_markers:
4849
}
4950

5051
impl<ET: behavior_type_traits::ElementWithRelAttribute> HasDomTokensDomApi<ET> for prop_markers::ElementWithRelAttribute::rel {
51-
type DomTokensDomApi<'a, R: 'a + ?Sized + RenderHtml> = <ET::ElementWithRelAttribute<R> as ElementWithRelList<R>>::RelList<'a>
52+
type DomTokensDomApi<'a, R: 'a + ?Sized + RenderHtml>
53+
= <ET::ElementWithRelAttribute<R> as ElementWithRelList<R>>::RelList<'a>
5254
where
5355
ET: 'a;
5456

packages/frender-html/src/element_proxy_attrs.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ mod dom {
187187
}
188188

189189
impl<R: ?Sized, E: ?Sized + behaviors::ElementWithClassList<R>> behaviors::ElementWithClassList<R> for ElementProxyAttrs<E> {
190-
type ClassList<'a> = E::ClassList<'a>
190+
type ClassList<'a>
191+
= E::ClassList<'a>
191192
where
192193
Self: 'a,
193194
R: 'a;
@@ -198,7 +199,8 @@ mod dom {
198199
}
199200

200201
impl<R: ?Sized, E: ?Sized + behaviors::ElementWithRelList<R>> behaviors::ElementWithRelList<R> for ElementProxyAttrs<E> {
201-
type RelList<'a> = E::RelList<'a>
202+
type RelList<'a>
203+
= E::RelList<'a>
202204
where
203205
Self: 'a,
204206
R: 'a;
@@ -209,7 +211,8 @@ mod dom {
209211
}
210212

211213
impl<R: ?Sized, E: ?Sized + behaviors::ElementWithStyle<R>> behaviors::ElementWithStyle<R> for ElementProxyAttrs<E> {
212-
type Style<'a> = E::Style<'a>
214+
type Style<'a>
215+
= E::Style<'a>
213216
where
214217
Self: 'a,
215218
R: 'a;

packages/frender-html/src/style.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ pub(crate) trait HasStyleDomApi<BT: BehaviorType> {
3232
}
3333

3434
impl<ET: behavior_type_traits::HtmlElement> HasStyleDomApi<ET> for prop_markers::HtmlElement::style {
35-
type StyleDomApi<'a, R: 'a + ?Sized + RenderHtml> = <ET::HtmlElement<R> as ElementWithStyle<R>>::Style<'a>
35+
type StyleDomApi<'a, R: 'a + ?Sized + RenderHtml>
36+
= <ET::HtmlElement<R> as ElementWithStyle<R>>::Style<'a>
3637
where
3738
ET: 'a;
3839

packages/frender-style/src/declaration/name.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ pub mod csr {
130130
}
131131

132132
impl<S: ToAsRefStr> ToAsRefStr for DeclarationNameStrStaticCache<S> {
133-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
133+
type ToAsRefStr<'a>
134+
= S::ToAsRefStr<'a>
134135
where
135136
Self: 'a;
136137

@@ -173,7 +174,8 @@ pub mod csr {
173174
}
174175

175176
impl<S: ToAsRefStr> ToAsRefStr for CacheableDeclarationName<S> {
176-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
177+
type ToAsRefStr<'a>
178+
= S::ToAsRefStr<'a>
177179
where
178180
Self: 'a;
179181

@@ -195,7 +197,8 @@ pub mod csr {
195197
}
196198

197199
impl<S: ToAsRefStr> ToAsRefStr for CacheableDeclarationNameIntoStaticStrCache<S> {
198-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
200+
type ToAsRefStr<'a>
201+
= S::ToAsRefStr<'a>
199202
where
200203
Self: 'a;
201204

packages/frender-style/src/declaration/value.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ pub mod csr {
165165
pub struct CacheableDeclarationValueIntoStaticStrCache<S>(S);
166166

167167
impl<S: ToAsRefStr> ToAsRefStr for CacheableDeclarationValue<S> {
168-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
168+
type ToAsRefStr<'a>
169+
= S::ToAsRefStr<'a>
169170
where
170171
Self: 'a;
171172

@@ -187,7 +188,8 @@ pub mod csr {
187188
}
188189

189190
impl<S: ToAsRefStr> ToAsRefStr for CacheableDeclarationValueIntoStaticStrCache<S> {
190-
type ToAsRefStr<'a> = S::ToAsRefStr<'a>
191+
type ToAsRefStr<'a>
192+
= S::ToAsRefStr<'a>
191193
where
192194
Self: 'a;
193195

0 commit comments

Comments
 (0)