Skip to content

Commit

Permalink
Updated view snapshots in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar4ys committed Feb 10, 2024
1 parent 120ba4b commit 46a068a
Show file tree
Hide file tree
Showing 12 changed files with 789 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ fn view() {
{
let props = ::leptos::component_props_builder(&SimpleCounter)
.initial_value(#[allow(unused_braces)] { 0 })
.step(#[allow(unused_braces)] { 1 })
.build();
#[allow(unreachable_code)] ::leptos::component_view(&SimpleCounter, props)
.step(#[allow(unused_braces)] { 1 });
#[allow(clippy::let_unit_value, clippy::unit_arg)]
let props = props.build();
#[allow(unreachable_code)]
::leptos::component_view(
#[allow(clippy::needless_borrows_for_generic_args)]
&SimpleCounter,
props,
)
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ fn view() {
#[allow(unused_braces)]
{
{
let props = ::leptos::component_props_builder(&ExternalComponent)
.build();
let props = ::leptos::component_props_builder(&ExternalComponent);
#[allow(clippy::let_unit_value, clippy::unit_arg)]
let props = props.build();
#[allow(unreachable_code)]
::leptos::component_view(&ExternalComponent, props)
::leptos::component_view(
#[allow(clippy::needless_borrows_for_generic_args)]
&ExternalComponent,
props,
)
}
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,90 @@ TokenStream [
],
span: bytes(65..71),
},
Punct {
char: ';',
spacing: Alone,
span: bytes(10..82),
},
Punct {
char: '#',
spacing: Alone,
span: bytes(10..82),
},
Group {
delimiter: Bracket,
stream: TokenStream [
Ident {
sym: allow,
span: bytes(10..82),
},
Group {
delimiter: Parenthesis,
stream: TokenStream [
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: let_unit_value,
span: bytes(10..82),
},
Punct {
char: ',',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: unit_arg,
span: bytes(10..82),
},
],
span: bytes(10..82),
},
],
span: bytes(10..82),
},
Ident {
sym: let,
span: bytes(10..82),
},
Ident {
sym: props,
span: bytes(10..82),
},
Punct {
char: '=',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: props,
span: bytes(10..82),
},
Punct {
char: '.',
spacing: Alone,
Expand Down Expand Up @@ -238,6 +322,45 @@ TokenStream [
Group {
delimiter: Parenthesis,
stream: TokenStream [
Punct {
char: '#',
spacing: Alone,
span: bytes(10..82),
},
Group {
delimiter: Bracket,
stream: TokenStream [
Ident {
sym: allow,
span: bytes(10..82),
},
Group {
delimiter: Parenthesis,
stream: TokenStream [
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: needless_borrows_for_generic_args,
span: bytes(10..82),
},
],
span: bytes(10..82),
},
],
span: bytes(10..82),
},
Punct {
char: '&',
spacing: Alone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,90 @@ TokenStream [
],
span: bytes(11..28),
},
Punct {
char: ';',
spacing: Alone,
span: bytes(10..82),
},
Punct {
char: '#',
spacing: Alone,
span: bytes(10..82),
},
Group {
delimiter: Bracket,
stream: TokenStream [
Ident {
sym: allow,
span: bytes(10..82),
},
Group {
delimiter: Parenthesis,
stream: TokenStream [
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: let_unit_value,
span: bytes(10..82),
},
Punct {
char: ',',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: unit_arg,
span: bytes(10..82),
},
],
span: bytes(10..82),
},
],
span: bytes(10..82),
},
Ident {
sym: let,
span: bytes(10..82),
},
Ident {
sym: props,
span: bytes(10..82),
},
Punct {
char: '=',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: props,
span: bytes(10..82),
},
Punct {
char: '.',
spacing: Alone,
Expand Down Expand Up @@ -211,6 +295,45 @@ TokenStream [
Group {
delimiter: Parenthesis,
stream: TokenStream [
Punct {
char: '#',
spacing: Alone,
span: bytes(10..82),
},
Group {
delimiter: Bracket,
stream: TokenStream [
Ident {
sym: allow,
span: bytes(10..82),
},
Group {
delimiter: Parenthesis,
stream: TokenStream [
Ident {
sym: clippy,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Joint,
span: bytes(10..82),
},
Punct {
char: ':',
spacing: Alone,
span: bytes(10..82),
},
Ident {
sym: needless_borrows_for_generic_args,
span: bytes(10..82),
},
],
span: bytes(10..82),
},
],
span: bytes(10..82),
},
Punct {
char: '&',
spacing: Alone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ fn view() {
{
let props = ::leptos::component_props_builder(&SimpleCounter)
.initial_value(#[allow(unused_braces)] { 0 })
.step(#[allow(unused_braces)] { 1 })
.build();
#[allow(unreachable_code)] ::leptos::component_view(&SimpleCounter, props)
.step(#[allow(unused_braces)] { 1 });
#[allow(clippy::let_unit_value, clippy::unit_arg)]
let props = props.build();
#[allow(unreachable_code)]
::leptos::component_view(
#[allow(clippy::needless_borrows_for_generic_args)]
&SimpleCounter,
props,
)
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ fn view() {
#[allow(unused_braces)]
{
{
let props = ::leptos::component_props_builder(&ExternalComponent)
.build();
let props = ::leptos::component_props_builder(&ExternalComponent);
#[allow(clippy::let_unit_value, clippy::unit_arg)]
let props = props.build();
#[allow(unreachable_code)]
::leptos::component_view(&ExternalComponent, props)
::leptos::component_view(
#[allow(clippy::needless_borrows_for_generic_args)]
&ExternalComponent,
props,
)
}
},
)
Expand Down
Loading

0 comments on commit 46a068a

Please sign in to comment.