fix(contracts): wrap conditional Card actions in Some/None #156

Merged
nrupard merged 1 commit from chore/checks-workflow-24ff62c7 into main 2026-06-15 18:26:47 +02:00
Owner

The RateCardItemsCard passed bare rsx! { ... } / rsx! {} branches to the Card actions: Option<Element> prop. The rsx macro cannot parse a bare nested rsx! as an attribute value in that position, so cargo clippy/cargo check failed with "Expected an expression" at the inner rsx!. Wrap the truthy branch in Some(rsx! { ... }) and the falsy branch in None, matching the working pattern already used for the Description card in tickets.rs.

Also apply cargo fmt to two pre-existing formatting drifts in the same file (the after field map chain and the let-else return), which cargo fmt --all --check flagged, and refresh Cargo.lock so the recorded mokosh-apps version matches Cargo.toml (0.3.0).

#MAPPS-180

The RateCardItemsCard passed bare `rsx! { ... }` / `rsx! {}` branches to the Card `actions: Option<Element>` prop. The rsx macro cannot parse a bare nested `rsx!` as an attribute value in that position, so `cargo clippy`/`cargo check` failed with "Expected an expression" at the inner `rsx!`. Wrap the truthy branch in `Some(rsx! { ... })` and the falsy branch in `None`, matching the working pattern already used for the Description card in tickets.rs. Also apply `cargo fmt` to two pre-existing formatting drifts in the same file (the `after` field map chain and the let-else `return`), which `cargo fmt --all --check` flagged, and refresh Cargo.lock so the recorded mokosh-apps version matches Cargo.toml (0.3.0). #MAPPS-180
fix(contracts): wrap conditional Card actions in Some/None
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m14s
Create release / Create release from merged PR (pull_request) Has been skipped
eb4b2c8787
The RateCardItemsCard passed bare `rsx! { ... }` / `rsx! {}` branches to the Card `actions: Option<Element>` prop. The rsx macro cannot parse a bare nested `rsx!` as an attribute value in that position, so `cargo clippy`/`cargo check` failed with "Expected an expression" at the inner `rsx!`. Wrap the truthy branch in `Some(rsx! { ... })` and the falsy branch in `None`, matching the working pattern already used for the Description card in tickets.rs.

Also apply `cargo fmt` to two pre-existing formatting drifts in the same file (the `after` field map chain and the let-else `return`), which `cargo fmt --all --check` flagged, and refresh Cargo.lock so the recorded mokosh-apps version matches Cargo.toml (0.3.0).

#MAPPS-180
nrupard deleted branch chore/checks-workflow-24ff62c7 2026-06-15 18:26:47 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!156
No description provided.