From 70fbc2a02d5d31248703feed7d2b7b8cc38486e1 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 24 Nov 2026 02:34:10 +0100 Subject: [PATCH] Kill the mutants that survived in the Rust planter --- bin/task_bench/rust_bugs.py | 5 +++-- bin/task_bench/test_rust_bugs.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/task_bench/rust_bugs.py b/bin/task_bench/rust_bugs.py index d690875c..ba79a414 100644 --- a/bin/task_bench/rust_bugs.py +++ b/bin/task_bench/rust_bugs.py @@ -56,7 +56,8 @@ def changed(diff: bytes) -> tuple[int, tuple[bytes, ...], tuple[bytes, ...]] | N at = [index for index, line in enumerate(body) if line[:1] in (b"-", b"+")] if not at: return None - first = int(hunks[0]) + sum(not line.startswith(b"+") for line in body[:at[0]]) + # Each line before the first changed one is a line of the tree. + first = int(hunks[0]) + at[0] span = body[at[0]:at[-1] + 1] was = tuple(line[1:] for line in span if not line.startswith(b"+")) now = tuple(line[1:].replace(MARK, b"") for line in span if not line.startswith(b"-")) @@ -87,6 +88,6 @@ def task_text(output: str) -> str | None: message.append(line.strip()) # A test in a module is named after it, as `tests::adds`; a message may name the whole or the test alone. A Rust test's own # name is often a plain word, such as `big`, so a longer identifier that holds it, such as `is_big`, doesn't name the test. - names = [re.compile(rf"(?