From 865410b6f2a7a57bcf162b3f55339145ee751534 Mon Sep 17 00:00:00 2001 From: Lucas Vas Date: Mon, 12 Jan 2026 14:55:32 -0500 Subject: [PATCH] style: apply rustfmt --- src/pages/scholarship_info.rs | 423 ++++++++++++++++++---------------- 1 file changed, 222 insertions(+), 201 deletions(-) diff --git a/src/pages/scholarship_info.rs b/src/pages/scholarship_info.rs index 1d37821..de8ec91 100644 --- a/src/pages/scholarship_info.rs +++ b/src/pages/scholarship_info.rs @@ -40,20 +40,13 @@ pub fn ScholarshipInfoPage() -> impl IntoView { // Remember that we only want to show the page after we've got authentication information // and if there's data for us to use. view! { - +
- + +

"Confirm Deletion"

"Are you sure you want to delete " {move || { - pending_delete.get().map(|s| { - s.data.get("name").unwrap_or(&ValueType::String(None)) - .as_string() - .unwrap_or_default() - .unwrap_or("".to_string()) - }) - }} - "?" + pending_delete + .get() + .map(|s| { + s.data + .get("name") + .unwrap_or(&ValueType::String(None)) + .as_string() + .unwrap_or_default() + .unwrap_or("".to_string()) + }) + }} "?"

"Confirm" - "Cancel" + > + "Confirm" + + "Cancel"
@@ -223,31 +220,42 @@ fn ScholarshipList(
{move || { - scholarships.get().map(|result| { - match result { - Ok(list) => { - let views = list.iter().map(|entry| { - view! { - - } - }); - Either::Left(views.collect_view()) + scholarships + .get() + .map(|result| { + match result { + Ok(list) => { + let views = list + .iter() + .map(|entry| { + view! { + + } + }); + Either::Left(views.collect_view()) + } + Err(err) => { + Either::Right( + view! { +
+

"Failed to load scholarship list: "{err.to_string()}

+
+ }, + ) + } } - Err(err) => { - Either::Right(view! { -
-

"Failed to load scholarship list: "{err.to_string()}

-
- }) - } - } - }).collect_view() + }) + .collect_view() }}
-
+
"Create New"
@@ -307,13 +315,15 @@ fn ScholarshipListEntry( {name}
-
"Edit"
-
@@ -490,166 +500,177 @@ fn ScholarshipForm( "Choose a scholarship from the right, or create a new one."

} + fallback=|| { + view! {

"Choose a scholarship from the right, or create a new one."

} + } > - + {move || { - scholarship_info.get() + scholarship_info + .get() .map(|res_scholarship| { match res_scholarship { Ok(_) => { - Either::Left(view! { - -

- "Scholarship Info Form (test)" -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }) + Either::Left( + view! { + +

+ "Scholarship Info Form (test)" +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + }, + ) } Err(err) => { - Either::Right(view! { -

"Error while getting scholarship: "{err.to_string()}

- }) + Either::Right( + view! { +

"Error while getting scholarship: "{err.to_string()}

+ }, + ) } } - }).collect_view() + }) + .collect_view() }}
- "Create Comparisons" + "Create Comparisons"