diff --git a/src/app/routes/admin/devlog.rs b/src/app/routes/admin/devlog.rs index 22f196f..b2e4b1b 100644 --- a/src/app/routes/admin/devlog.rs +++ b/src/app/routes/admin/devlog.rs @@ -42,8 +42,7 @@ async fn add_devlog( #[component] pub fn Devlog() -> impl IntoView { - let add_devlog = - create_server_action::(); + let add_devlog = create_server_action::(); let devlogs = create_resource( move || {}, |_| join(fetch_devlogs(), fetch_issues()), @@ -188,9 +187,7 @@ fn AddDevlogToIssueForm( issue_id: Option, ) -> impl IntoView { let associate_devlog_with_issue = - create_server_action::< - AssociateDevlogWithIssue, - >(); + create_server_action::(); view! {
  • @@ -287,10 +284,7 @@ ORDER BY devlog.id" .fetch_all(&pool) .await?; - Ok(devlogs - .into_iter() - .map(DevlogData::from) - .collect()) + Ok(devlogs.into_iter().map(DevlogData::from).collect()) } #[server] diff --git a/src/app/routes/admin/devlog/id.rs b/src/app/routes/admin/devlog/id.rs index 57a18b7..43166dc 100644 --- a/src/app/routes/admin/devlog/id.rs +++ b/src/app/routes/admin/devlog/id.rs @@ -23,8 +23,7 @@ async fn update_devlog( .parse::() .map_err(|_| { ServerFnError::::ServerError( - "expected a valid devlog id" - .to_string(), + "expected a valid devlog id".to_string(), ) })? .into(); @@ -415,8 +414,7 @@ async fn associate_image_with_devlog( .parse::() .map_err(|_| { ServerFnError::::ServerError( - "expected a valid devlog id" - .to_string(), + "expected a valid devlog id".to_string(), ) })? .into(); @@ -460,8 +458,7 @@ async fn remove_image_from_devlog( .parse::() .map_err(|_| { ServerFnError::::ServerError( - "expected a valid devlog id" - .to_string(), + "expected a valid devlog id".to_string(), ) })? .into(); @@ -537,8 +534,7 @@ fn DevlogImageLi( url: String, ) -> impl IntoView { let remove_image_from_devlog = - create_server_action::( - ); + create_server_action::(); view! {
  • @@ -578,9 +574,7 @@ fn ImageLi( description: String, ) -> impl IntoView { let associate_image_with_devlog = - create_server_action::< - AssociateImageWithDevlog, - >(); + create_server_action::(); view! {
  • diff --git a/src/app/routes/admin/issue.rs b/src/app/routes/admin/issue.rs index 0449f17..7082703 100644 --- a/src/app/routes/admin/issue.rs +++ b/src/app/routes/admin/issue.rs @@ -631,7 +631,6 @@ issue_id.as_slice() // devlogs - #[component] fn Devlogs() -> impl IntoView { let params = use_params_map(); @@ -675,9 +674,7 @@ fn Devlogs() -> impl IntoView { } #[component] -fn DevlogLi( - devlog: DevlogData, -) -> impl IntoView { +fn DevlogLi(devlog: DevlogData) -> impl IntoView { view! {
  • @@ -791,13 +788,10 @@ LEFT JOIN ( ) AS si ON si.devlog_id = devlog.id WHERE issue__devlog.issue_id = ? ORDER BY devlog.posted_date", -issue_id.as_slice() + issue_id.as_slice() ) .fetch_all(&pool) .await?; - Ok(devlogs - .into_iter() - .map(DevlogData::from) - .collect()) + Ok(devlogs.into_iter().map(DevlogData::from).collect()) } diff --git a/src/app/routes/issue.rs b/src/app/routes/issue.rs index 3217f5c..1b11a4a 100644 --- a/src/app/routes/issue.rs +++ b/src/app/routes/issue.rs @@ -142,7 +142,6 @@ struct SqlCrateRelease { images: Option>, } - #[derive(Clone, Serialize, Deserialize)] struct Devlog { title: String, @@ -227,8 +226,7 @@ struct SqlShowcaseData { Option>>, crate_releases: Option>>, - devlogs: - Option>>, + devlogs: Option>>, new_github_issues: Option>>, new_pull_requests: @@ -781,9 +779,7 @@ fn CrateReleaseView( } #[component] -fn DevlogView( - devlog: Devlog, -) -> impl IntoView { +fn DevlogView(devlog: Devlog) -> impl IntoView { let mut it = devlog.images.iter(); let first_image = it.next(); view! { @@ -960,7 +956,6 @@ fn VideoLink(url: String) -> impl IntoView { } } - #[component] fn PostLink(url: String) -> impl IntoView { view! {