From 12ca32c4a5ec089fd97ca109f22959443ee5d6c5 Mon Sep 17 00:00:00 2001 From: dewert99 Date: Sat, 3 Aug 2024 09:29:09 -0700 Subject: [PATCH] Fix creusot argument command --- creusot/tests/ui.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/creusot/tests/ui.rs b/creusot/tests/ui.rs index b1f31b5d92..15e829d367 100644 --- a/creusot/tests/ui.rs +++ b/creusot/tests/ui.rs @@ -91,8 +91,14 @@ fn run_creusot( // Find comment chunks of the form CREUSOT_ARG=ARGUMENT. Does not support spaces in arguments currently (would require real parser) let args: Vec<_> = header_line .split(" ") - .filter(|chunk| chunk.contains("CREUSOT_ARG")) - .flat_map(|chunk| chunk.split("=").nth(1)) + .filter_map(|chunk| { + let (first, rest) = chunk.split_once("=")?; + if first != "CREUSOT_ARG" { + None + } else { + Some(rest) + } + }) .collect(); cmd.args(&[