From d32df2299092c432c8f0cf272c17d81bfe899a7a Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 18 Oct 2024 11:03:28 -0700 Subject: [PATCH] other fixes --- src/read2.rs | 2 +- src/runtest.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/read2.rs b/src/read2.rs index 726686f..715ea86 100644 --- a/src/read2.rs +++ b/src/read2.rs @@ -129,7 +129,7 @@ mod imp { pub fn read2( out_pipe: ChildStdout, err_pipe: ChildStderr, - data: &mut FnMut(bool, &mut Vec, bool), + data: &mut dyn FnMut(bool, &mut Vec, bool), ) -> io::Result<()> { let mut out = Vec::new(); let mut err = Vec::new(); diff --git a/src/runtest.rs b/src/runtest.rs index e1a0da5..2eeca4f 100644 --- a/src/runtest.rs +++ b/src/runtest.rs @@ -1940,9 +1940,7 @@ actual:\n\ fn charset() -> &'static str { // FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset - if cfg!(target_os = "bitrig") { - "auto" - } else if cfg!(target_os = "freebsd") { + if cfg!(target_os = "freebsd") { "ISO-8859-1" } else { "UTF-8" @@ -3142,8 +3140,8 @@ fn read2_abbreviated(mut child: Child) -> io::Result { read2( child.stdout.take().unwrap(), child.stderr.take().unwrap(), - &mut |is_stdout, data, _| { - if is_stdout { &mut stdout } else { &mut stderr }.extend(data); + &mut |is_stdout, data: &mut Vec, _| { + if is_stdout { &mut stdout } else { &mut stderr }.extend(&data); data.clear(); }, )?;