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(&[