Skip to content

Commit

Permalink
other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Oct 18, 2024
1 parent 254abe5 commit d32df22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/read2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ mod imp {
pub fn read2(
out_pipe: ChildStdout,
err_pipe: ChildStderr,
data: &mut FnMut(bool, &mut Vec<u8>, bool),
data: &mut dyn FnMut(bool, &mut Vec<u8>, bool),
) -> io::Result<()> {
let mut out = Vec::new();
let mut err = Vec::new();
Expand Down
8 changes: 3 additions & 5 deletions src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -3142,8 +3140,8 @@ fn read2_abbreviated(mut child: Child) -> io::Result<Output> {
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<u8>, _| {
if is_stdout { &mut stdout } else { &mut stderr }.extend(&data);
data.clear();
},
)?;
Expand Down

0 comments on commit d32df22

Please sign in to comment.