Skip to content

Commit 2656f00

Browse files
ci: make CI genuinely green — rust-ci toolchain pin + fmt/clippy (#48)
## Summary Make CI genuinely green. The shared rust-ci pin on `main` predates standards#439, so the SHA-pinned `dtolnay/rust-toolchain` step errors out before the job runs. This bumps the pin so rust-ci actually runs, and brings the Rust sources to fmt + clippy(`-D warnings`) clean under the CI toolchain (stable 1.96). ## Changes - **rust-ci:** bump `rust-ci-reusable.yml` pin `d135b05` → `8dc2bf0` (current `standards` HEAD; includes #439 toolchain fix + #441/#442). - **Rust hygiene:** `cargo fmt` + `clippy --fix` where the repo had pre-existing drift, so `cargo fmt --all -- --check` and `cargo clippy --locked --all-targets -- -D warnings` pass. ## 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 e65ee21 commit 2656f00

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ permissions:
1414

1515
jobs:
1616
rust-ci:
17-
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@d135b05bfc647d0c0fbfedc7e80f37ea50f49236
17+
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@8dc2bf039d1ff0372d650895c46bea7fbaec68ff

src/codegen/ats_gen.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,18 @@ mod tests {
389389

390390
#[test]
391391
fn test_parse_pattern() {
392-
assert_eq!(parse_pattern("alloc").expect("TODO: handle error"), OwnershipPattern::Alloc);
393-
assert_eq!(parse_pattern("free").expect("TODO: handle error"), OwnershipPattern::Free);
394-
assert_eq!(parse_pattern("borrow").expect("TODO: handle error"), OwnershipPattern::Borrow);
392+
assert_eq!(
393+
parse_pattern("alloc").expect("TODO: handle error"),
394+
OwnershipPattern::Alloc
395+
);
396+
assert_eq!(
397+
parse_pattern("free").expect("TODO: handle error"),
398+
OwnershipPattern::Free
399+
);
400+
assert_eq!(
401+
parse_pattern("borrow").expect("TODO: handle error"),
402+
OwnershipPattern::Borrow
403+
);
395404
assert_eq!(
396405
parse_pattern("transfer").expect("TODO: handle error"),
397406
OwnershipPattern::Transfer

src/codegen/compiler.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ mod tests {
271271
#[test]
272272
fn test_build_command_structure() {
273273
let manifest = test_manifest();
274-
let cmd = build_command(&manifest, "generated/ats/test_safe.dats", false).expect("TODO: handle error");
274+
let cmd = build_command(&manifest, "generated/ats/test_safe.dats", false)
275+
.expect("TODO: handle error");
275276

276277
assert_eq!(cmd.program, "patscc");
277278
assert!(cmd.args.contains(&"-DATS_MEMALLOC_LIBC".to_string()));

0 commit comments

Comments
 (0)