From ca35fe181ed578f1fb4047de8dd8ea7595daec0d Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 7 May 2019 18:22:04 +0200 Subject: openpgp-ffi, ffi: Improve 6911aed9. - To preserve location information, replace the include. --- openpgp-ffi/tests/c-tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openpgp-ffi/tests') diff --git a/openpgp-ffi/tests/c-tests.rs b/openpgp-ffi/tests/c-tests.rs index b14ecadb..06ab21a5 100644 --- a/openpgp-ffi/tests/c-tests.rs +++ b/openpgp-ffi/tests/c-tests.rs @@ -265,7 +265,9 @@ fn wrap_with_main(test: &mut Vec, offset: usize) { let needs_wrapping = ! has_main(test); // Replace glibc-style error handling. - test.retain(|l| l != "#include "); + test.iter_mut().for_each(|l| { + if l == "#include " { *l = "".into() } + }); let mut last_include = 0; for (n, line) in test.iter().enumerate() { -- cgit v1.2.3