Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dylni committed Aug 11, 2024
1 parent 6dc16b0 commit ee5385c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/control/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ impl Process for &mut Child {
self
}

#[allow(private_interfaces)]
fn run_wait(&mut self, options: Options) -> WaitResult<Self::Result> {
let result = self.try_wait();
if let Ok(Some(exit_status)) = result {
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ pub struct Output {
}

impl Output {
/// Converts this structure to the best equivalent [`process::Output`]
/// Converts this structure to a corresponding [`process::Output`]
/// instance.
///
/// For more information, see [`ExitStatus`].
/// For more information, see [`ExitStatus::into_std_lossy`].
///
/// # Examples
///
Expand Down Expand Up @@ -409,9 +409,9 @@ impl From<Output> for ExitStatus {
///
/// If this function returns `Ok(false)`, the passed output will be discarded
/// and not included in [`Output`]. Errors will be propagated to
/// [`Control::wait`]. For any more complex cases, where only slices of bytes
/// should be included in some cases, this function can always return `false`
/// and maintain the output buffer itself.
/// [`Control::wait`]. For more complex cases, where specific portions of read
/// bytes should be included, this function can return `false` and maintain the
/// output buffer itself.
///
/// # Examples
///
Expand Down
4 changes: 0 additions & 4 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ impl<'a> Process<'a> {
)))]
compile_error!("unsupported pointer width");

#[cfg_attr(
not(target_os = "freebsd"),
allow(clippy::useless_conversion)
)]
let limit = PointerWidth::try_from(limit)
.expect("`usize` too large for pointer width")
.into();
Expand Down
2 changes: 1 addition & 1 deletion src/windows/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Pipe {
}

fn cancel_io(&self) -> io::Result<()> {
unsafe { super::check_syscall(CancelIo(self.raw())).map(drop) }
super::check_syscall(unsafe { CancelIo(self.raw()) }).map(drop)
}
}

Expand Down

0 comments on commit ee5385c

Please sign in to comment.