fix(contracts): apply rustfmt and fix conditional rsx actions #155

Merged
nrupard merged 1 commit from fix/mapps-179-contracts-fmt into main 2026-06-15 18:25:12 +02:00
Owner

CI run #576 failed cargo fmt --check on src/pages/contracts.rs at lines 2036 and 2166. Running cargo fmt applies the rustfmt formatting (multi-line method chain and let-else block) to satisfy the check.

Once fmt passed, the subsequent CI steps (wasm check, clippy) revealed a latent compile error in the same file: the RateCardItemsCard actions: attribute fed rsx! {...} / rsx! {} into a Card prop typed Option<Element> through an if/else, which the rsx! macro could not parse ("Expected an expression" at the rsx! block). Wrapping the branches as Some(rsx! {...}) / None matches the prop type and compiles. fmt failed first in CI so this never surfaced on the original run, but it blocks the full check suite from going green.

Cargo.lock is synced from 0.2.0 to 0.3.0 to match the package version in Cargo.toml (refreshed automatically by the build).

All four CI checks pass locally: cargo fmt --all --check, cargo clippy --all-targets -- -D warnings, cargo check --target wasm32-unknown-unknown, cargo test --lib (80 passed).

#MAPPS-179

CI run #576 failed cargo fmt --check on src/pages/contracts.rs at lines 2036 and 2166. Running cargo fmt applies the rustfmt formatting (multi-line method chain and let-else block) to satisfy the check. Once fmt passed, the subsequent CI steps (wasm check, clippy) revealed a latent compile error in the same file: the RateCardItemsCard `actions:` attribute fed `rsx! {...}` / `rsx! {}` into a `Card` prop typed `Option<Element>` through an if/else, which the rsx! macro could not parse ("Expected an expression" at the rsx! block). Wrapping the branches as `Some(rsx! {...})` / `None` matches the prop type and compiles. fmt failed first in CI so this never surfaced on the original run, but it blocks the full check suite from going green. Cargo.lock is synced from 0.2.0 to 0.3.0 to match the package version in Cargo.toml (refreshed automatically by the build). All four CI checks pass locally: cargo fmt --all --check, cargo clippy --all-targets -- -D warnings, cargo check --target wasm32-unknown-unknown, cargo test --lib (80 passed). #MAPPS-179
fix(contracts): apply rustfmt and fix conditional rsx actions
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 55s
Create release / Create release from merged PR (pull_request) Has been skipped
609e2cfbcf
CI run #576 failed cargo fmt --check on src/pages/contracts.rs at lines 2036 and 2166. Running cargo fmt applies the rustfmt formatting (multi-line method chain and let-else block) to satisfy the check.

Once fmt passed, the subsequent CI steps (wasm check, clippy) revealed a latent compile error in the same file: the RateCardItemsCard `actions:` attribute fed `rsx! {...}` / `rsx! {}` into a `Card` prop typed `Option<Element>` through an if/else, which the rsx! macro could not parse ("Expected an expression" at the rsx! block). Wrapping the branches as `Some(rsx! {...})` / `None` matches the prop type and compiles. fmt failed first in CI so this never surfaced on the original run, but it blocks the full check suite from going green.

Cargo.lock is synced from 0.2.0 to 0.3.0 to match the package version in Cargo.toml (refreshed automatically by the build).

All four CI checks pass locally: cargo fmt --all --check, cargo clippy --all-targets -- -D warnings, cargo check --target wasm32-unknown-unknown, cargo test --lib (80 passed).

#MAPPS-179
nrupard deleted branch fix/mapps-179-contracts-fmt 2026-06-15 18:25:12 +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!155
No description provided.