We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a59732 commit 3410596Copy full SHA for 3410596
1 file changed
host/src/stderr_capture.rs
@@ -28,8 +28,7 @@ mod imp {
28
.lock()
29
.unwrap_or_else(|poisoned| poisoned.into_inner());
30
let capture_file = std::fs::File::create(path)?;
31
- let original_stderr =
32
- OwnedFd::from(unistd::dup(2).map(|fd| unsafe { OwnedFd::from_raw_fd(fd) })?);
+ let original_stderr = unistd::dup(2).map(|fd| unsafe { OwnedFd::from_raw_fd(fd) })?;
33
unistd::dup2(capture_file.as_raw_fd(), 2)?;
34
// capture_file dropped here — its OwnedFd closes the fd via RAII
35
Ok(Self {
0 commit comments