ci: build against bread-ecosystem's shared Arch CI image, add check.yml
All checks were successful
check / check (push) Successful in 26s

Same fix as breadpad: build inside the shared pinned Arch container
(bread-ecosystem/ci/, cloned at the sha in ci/bread-ecosystem.rev)
instead of building natively against whatever's on the runner host.
Adds check.yml (clippy + test on feature/**/fix/**) as a fast-fail gate
before anything reaches main.

Turning on clippy -D warnings for the first time surfaced 10 pre-existing
warnings (int_plus_one, ptr_arg on &mut Vec params, collapsible_if,
collapsible_match) across layout.rs, mirror.rs, profile.rs, and the
config/mirror TUI views — all fixed exactly per clippy's suggested diffs,
verified behavior-preserving (the mirror_view.rs collapse in particular:
confirmed the "do nothing" fallthrough when mirror.result is None is
unchanged, since that was already the fallthrough behavior of the
original nested if with no matching else on the outer condition).

Verified locally: build, clippy, and test all pass through the new
container path.
This commit is contained in:
Breadway 2026-08-05 14:02:47 +08:00
parent c692b597b3
commit d73eacf40f
12 changed files with 97 additions and 53 deletions

View file

@ -103,7 +103,7 @@ pub fn snap_position(
}
/// Move the selected monitor by (dx, dy) pixels, then snap.
pub fn move_selected(state: &LayoutState, monitors: &mut Vec<Monitor>, dx: i32, dy: i32) {
pub fn move_selected(state: &LayoutState, monitors: &mut [Monitor], dx: i32, dy: i32) {
let idx = state.selected;
if idx >= monitors.len() {
return;
@ -116,7 +116,7 @@ pub fn move_selected(state: &LayoutState, monitors: &mut Vec<Monitor>, dx: i32,
}
/// Place monitors in a left-to-right row with no gaps.
pub fn auto_arrange(monitors: &mut Vec<Monitor>) {
pub fn auto_arrange(monitors: &mut [Monitor]) {
let mut cursor = 0i32;
for m in monitors.iter_mut() {
m.x = cursor;