Skip to content

Commit 3c05860

Browse files
ci: fmt under stable 1.96 to make rust-ci green (follow-up) (#42)
## Summary Follow-up to the merged CI-green PR. With rust-ci now running, `cargo fmt --all -- --check` fails on `main` under the CI toolchain (stable rustfmt 1.96) — the toolchain-pin landed before the formatting fix. This brings the Rust sources to rustfmt-clean so rust-ci goes green. ## Changes - **Rust hygiene:** `cargo fmt` (`src/codegen/affine_gen.rs`, `src/codegen/wasm_gen.rs`) so `cargo fmt --all -- --check` passes under stable 1.96. ## RSR Quality Checklist ### Required - [x] Tests pass (`cargo test --locked --all-targets`) - [x] Code is formatted (`cargo fmt --all -- --check`) - [x] Linter is clean (`cargo clippy --locked --all-targets -- -D warnings`) - [x] No banned language patterns - [x] SPDX license headers present on modified files - [x] No secrets, credentials, or `.env` files included ## Testing Verified locally with the CI toolchain (rustc/clippy/rustfmt 1.96.0): `cargo fmt --check`, `clippy -D warnings`, `cargo check --locked`, `cargo test --locked` all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- _Generated by [Claude Code](https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 65adbce commit 3c05860

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/codegen/affine_gen.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ fn generate_resource_wrapper(out: &mut String, resource: &AffineResource) {
119119
marker = affinity_marker
120120
)
121121
.expect("TODO: handle error");
122-
writeln!(out, " let raw = @ffi::{}(params);", resource.allocator).expect("TODO: handle error");
122+
writeln!(out, " let raw = @ffi::{}(params);", resource.allocator)
123+
.expect("TODO: handle error");
123124
writeln!(out, " {}<{}>::wrap(raw)", type_name, affinity_marker).expect("TODO: handle error");
124125
writeln!(out, " }}").expect("TODO: handle error");
125126
writeln!(out).expect("TODO: handle error");
@@ -163,7 +164,8 @@ fn generate_resource_wrapper(out: &mut String, resource: &AffineResource) {
163164
type_name
164165
)
165166
.expect("TODO: handle error");
166-
writeln!(out, " impl MustConsume for {}<Linear> {{}}", type_name).expect("TODO: handle error");
167+
writeln!(out, " impl MustConsume for {}<Linear> {{}}", type_name)
168+
.expect("TODO: handle error");
167169
}
168170
}
169171

src/codegen/wasm_gen.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ fn generate_build_config(config: &WasmConfig, module_name: &str) -> String {
7070
writeln!(out, "no-wasi = true").expect("TODO: handle error");
7171
}
7272
WasmTarget::Wasm32Wasi => {
73-
writeln!(out, "# WASI-enabled WASM (filesystem, env access)").expect("TODO: handle error");
73+
writeln!(out, "# WASI-enabled WASM (filesystem, env access)")
74+
.expect("TODO: handle error");
7475
writeln!(out, "wasi = true").expect("TODO: handle error");
7576
}
7677
}

0 commit comments

Comments
 (0)