Skip to content

Commit aeac275

Browse files
fix(deps): update rust crate toml to v0.8.21 (#134)
* fix(deps): update rust crate toml to v0.8.21 * Fix Clippy warnings --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniëlle Huisman <danielle@huisman.me>
1 parent d7429d8 commit aeac275

31 files changed

Lines changed: 213 additions & 219 deletions

File tree

Cargo.lock

Lines changed: 18 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/middleware/offset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn convert_value_to_coords<Element: Clone, Window: Clone>(
4545
if let Some(alignment_axis) = alignment_axis {
4646
cross_axis = match alignment {
4747
Alignment::Start => alignment_axis,
48-
Alignment::End => alignment_axis * -1.0,
48+
Alignment::End => -alignment_axis,
4949
};
5050
}
5151
}

packages/leptos/example/src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ pub fn App() -> impl IntoView {
4545
let arrow_x = Signal::derive(move || {
4646
arrow_data
4747
.get()
48-
.and_then(|arrow_data| arrow_data.x.map(|x| format!("{}px", x)))
48+
.and_then(|arrow_data| arrow_data.x.map(|x| format!("{x}px")))
4949
});
5050
let arrow_y = Signal::derive(move || {
5151
arrow_data
5252
.get()
53-
.and_then(|arrow_data| arrow_data.y.map(|y| format!("{}px", y)))
53+
.and_then(|arrow_data| arrow_data.y.map(|y| format!("{y}px")))
5454
});
5555

5656
view! {

packages/leptos/src/types.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,12 @@ impl Display for FloatingStyles {
202202
self.transform
203203
.as_ref()
204204
.map_or("".to_owned(), |transform| format!(
205-
" transform: {};",
206-
transform
205+
" transform: {transform};"
207206
),),
208207
self.will_change
209208
.as_ref()
210209
.map_or("".to_owned(), |will_change| format!(
211-
" will-change: {};",
212-
will_change
210+
" will-change: {will_change};"
213211
))
214212
)
215213
}

packages/leptos/tests/visual/src/spec/arrow.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub fn Arrow() -> impl IntoView {
9999
style:top=move || match static_side() {
100100
Side::Top => "-15px".to_owned(),
101101
_ => match arrow_y() {
102-
Some(arrow_y) => format!("{}px", arrow_y),
102+
Some(arrow_y) => format!("{arrow_y}px"),
103103
None => "".to_owned()
104104
}
105105
}
@@ -114,7 +114,7 @@ pub fn Arrow() -> impl IntoView {
114114
style:left=move || match static_side() {
115115
Side::Left => "-15px".to_owned(),
116116
_ => match arrow_x() {
117-
Some(arrow_x) => format!("{}px", arrow_x),
117+
Some(arrow_x) => format!("{arrow_x}px"),
118118
None => "".to_owned()
119119
}
120120
}
@@ -129,7 +129,7 @@ pub fn Arrow() -> impl IntoView {
129129
style:top=move || match static_side() {
130130
Side::Top => "-15px".to_owned(),
131131
_ => match arrow_y() {
132-
Some(arrow_y) => format!("{}px", arrow_y),
132+
Some(arrow_y) => format!("{arrow_y}px"),
133133
None => "".to_owned()
134134
}
135135
}
@@ -144,7 +144,7 @@ pub fn Arrow() -> impl IntoView {
144144
style:left=move || match static_side() {
145145
Side::Left => "-15px".to_owned(),
146146
_ => match arrow_x() {
147-
Some(arrow_x) => format!("{}px", arrow_x),
147+
Some(arrow_x) => format!("{arrow_x}px"),
148148
None => "".to_owned()
149149
}
150150
}
@@ -216,7 +216,7 @@ pub fn Arrow() -> impl IntoView {
216216
<div class="controls">
217217
<For
218218
each=|| [25, 125]
219-
key=|size| format!("{:?}", size)
219+
key=|size| format!("{size:?}")
220220
children=move |size| view! {
221221
<button
222222
data-testid=format!("reference-{size}")
@@ -237,7 +237,7 @@ pub fn Arrow() -> impl IntoView {
237237
<div class="controls">
238238
<For
239239
each=|| [75, 150]
240-
key=|size| format!("{:?}", size)
240+
key=|size| format!("{size:?}")
241241
children=move |size| view! {
242242
<button
243243
data-testid=format!("floating-{size}")
@@ -258,7 +258,7 @@ pub fn Arrow() -> impl IntoView {
258258
<div class="controls">
259259
<For
260260
each=|| [0, 20, 200]
261-
key=|size| format!("{:?}", size)
261+
key=|size| format!("{size:?}")
262262
children={
263263
let update_scroll = update_scroll.clone();
264264

@@ -294,7 +294,7 @@ pub fn Arrow() -> impl IntoView {
294294
<div class="controls">
295295
<For
296296
each=|| [true, false]
297-
key=|value| format!("{}", value)
297+
key=|value| format!("{value}")
298298
children={
299299
let update_scroll = update_scroll.clone();
300300

@@ -318,7 +318,7 @@ pub fn Arrow() -> impl IntoView {
318318
}
319319
}
320320
>
321-
{format!("{}", value)}
321+
{format!("{value}")}
322322
</button>
323323
}
324324
}
@@ -330,14 +330,14 @@ pub fn Arrow() -> impl IntoView {
330330
<div class="controls">
331331
<For
332332
each=|| ALL_PLACEMENTS
333-
key=|local_placement| format!("{:?}", local_placement)
333+
key=|local_placement| format!("{local_placement:?}")
334334
children={
335335
let update_scroll = update_scroll.clone();
336336

337337
move |local_placement| {
338338
view! {
339339
<button
340-
data-testid=format!("Placement{:?}", local_placement).to_case(Case::Kebab)
340+
data-testid=format!("Placement{local_placement:?}").to_case(Case::Kebab)
341341
style:background-color=move || if placement.get() == local_placement {
342342
"black"
343343
} else {
@@ -354,7 +354,7 @@ pub fn Arrow() -> impl IntoView {
354354
}
355355
}
356356
>
357-
{format!("{:?}", local_placement).to_case(Case::Kebab)}
357+
{format!("{local_placement:?}").to_case(Case::Kebab)}
358358
</button>
359359
}
360360
}
@@ -366,7 +366,7 @@ pub fn Arrow() -> impl IntoView {
366366
<div class="controls">
367367
<For
368368
each=|| [true, false]
369-
key=|value| format!("{}", value)
369+
key=|value| format!("{value}")
370370
children=move |value| view! {
371371
<button
372372
data-testid=format!("svg-{}", value)
@@ -377,7 +377,7 @@ pub fn Arrow() -> impl IntoView {
377377
}
378378
on:click=move |_| set_svg.set(value)
379379
>
380-
{format!("{}", value)}
380+
{format!("{value}")}
381381
</button>
382382
}
383383
/>
@@ -387,7 +387,7 @@ pub fn Arrow() -> impl IntoView {
387387
<div class="controls">
388388
<For
389389
each=|| [true, false]
390-
key=|value| format!("{}", value)
390+
key=|value| format!("{value}")
391391
children=move |value| view! {
392392
<button
393393
data-testid=format!("nested-{}", value)
@@ -398,7 +398,7 @@ pub fn Arrow() -> impl IntoView {
398398
}
399399
on:click=move |_| set_nested.set(value)
400400
>
401-
{format!("{}", value)}
401+
{format!("{value}")}
402402
</button>
403403
}
404404
/>
@@ -408,7 +408,7 @@ pub fn Arrow() -> impl IntoView {
408408
<div class="controls">
409409
<For
410410
each=|| [true, false]
411-
key=|value| format!("{}", value)
411+
key=|value| format!("{value}")
412412
children={
413413
let update_scroll = update_scroll.clone();
414414

@@ -443,7 +443,7 @@ pub fn Arrow() -> impl IntoView {
443443
}
444444
}
445445
>
446-
{format!("{}", value)}
446+
{format!("{value}")}
447447
</button>
448448
}
449449
}

0 commit comments

Comments
 (0)