Fix the router and stub out a number of crates to get compiling

This commit is contained in:
Jonathan Kelley committed 2024-01-13 20:51:37 -08:00
1 parent 4c6e515da4
commit fae0b08e61
226 files changed
+1057 -1482

No files matched your search

+21 -21
View File
@@ -230,9 +230,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
if you_are_happy && you_know_it {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
}
}
@@ -243,7 +243,7 @@ mod tests {
error: hook called conditionally: `use_state` (inside `if`)
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || "hands");
3 | let something = use_state(|| "hands");
| ^^^^^^^^^
|
= note: `if you_are_happy && you_know_it { … }` is the conditional
@@ -258,10 +258,10 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
match you_are_happy && you_know_it {
true => {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
}
_ => {}
@@ -274,7 +274,7 @@ mod tests {
error: hook called conditionally: `use_state` (inside `match`)
--> src/main.rs:4:29
|
4 | let something = use_state(cx, || "hands");
4 | let something = use_state(|| "hands");
| ^^^^^^^^^
|
= note: `match you_are_happy && you_know_it { … }` is the conditional
@@ -289,9 +289,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
for i in 0..10 {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
}
}
@@ -302,7 +302,7 @@ mod tests {
error: hook called in a loop: `use_state` (inside `for` loop)
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || "hands");
3 | let something = use_state(|| "hands");
| ^^^^^^^^^
|
= note: `for i in 0..10 { … }` is the loop
@@ -317,9 +317,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
while check_thing() {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
}
}
@@ -330,7 +330,7 @@ mod tests {
error: hook called in a loop: `use_state` (inside `while` loop)
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || "hands");
3 | let something = use_state(|| "hands");
| ^^^^^^^^^
|
= note: `while check_thing() { … }` is the loop
@@ -345,9 +345,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
loop {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
}
}
@@ -358,7 +358,7 @@ mod tests {
error: hook called in a loop: `use_state` (inside `loop`)
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || "hands");
3 | let something = use_state(|| "hands");
| ^^^^^^^^^
|
= note: `loop { … }` is the loop
@@ -373,9 +373,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
let something = || {
let something = use_state(cx, || "hands");
let something = use_state(|| "hands");
println!("clap your {something}")
};
}
@@ -386,7 +386,7 @@ mod tests {
error: hook called in a closure: `use_state`
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || "hands");
3 | let something = use_state(|| "hands");
| ^^^^^^^^^
"#};
@@ -399,9 +399,9 @@ mod tests {
let issue_report = check_file(
"src/main.rs".into(),
indoc! {r#"
fn App(cx: Scope) -> Element {
fn App() -> Element {
if you_are_happy && you_know_it {
let something = use_state(cx, || {
let something = use_state(|| {
"hands"
});
println!("clap your {something}")
@@ -414,7 +414,7 @@ mod tests {
error: hook called conditionally: `use_state` (inside `if`)
--> src/main.rs:3:25
|
3 | let something = use_state(cx, || {
3 | let something = use_state(|| {
| ^^^^^^^^^
4 | "hands"
5 | });