Skip to content

Commit 8aab927

Browse files
committed
fix: remove useless OwnedFd::from conversion (clippy)
Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent c6b9be6 commit 8aab927

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

host/src/stderr_capture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod imp {
2929
.unwrap_or_else(|poisoned| poisoned.into_inner());
3030
let capture_file = std::fs::File::create(path)?;
3131
let original_stderr =
32-
OwnedFd::from(unistd::dup(2).map(|fd| unsafe { OwnedFd::from_raw_fd(fd) })?);
32+
unistd::dup(2).map(|fd| unsafe { OwnedFd::from_raw_fd(fd) })?;
3333
unistd::dup2(capture_file.as_raw_fd(), 2)?;
3434
// capture_file dropped here — its OwnedFd closes the fd via RAII
3535
Ok(Self {

0 commit comments

Comments
 (0)