mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-25 10:33:21 +03:00
make rustdoc shut up about winapi's switched out types for docs
This commit is contained in:
parent
67f46e7a36
commit
4c61ddc40f
@ -1,4 +1,4 @@
|
||||
//! A [Tokio](https://tokio.rs)-based [`super::GitExecutor`] implementation.
|
||||
//! A [Tokio](https://tokio.rs)-based Git executor implementation.
|
||||
|
||||
#[cfg(unix)]
|
||||
mod unix;
|
||||
@ -13,7 +13,7 @@ pub use self::unix::TokioAskpassServer;
|
||||
#[cfg(windows)]
|
||||
pub use self::windows::TokioAskpassServer;
|
||||
|
||||
/// A [`super::GitExecutor`] implementation using the `git` command-line tool
|
||||
/// A Git executor implementation using the `git` command-line tool
|
||||
/// via [`tokio::process::Command`].
|
||||
pub struct TokioExecutor;
|
||||
|
||||
|
@ -21,8 +21,14 @@ impl Socket for BufStream<NamedPipeServer> {
|
||||
let mut out_pid: winapi::shared::minwindef::ULONG = 0;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
let r =
|
||||
unsafe { winapi::um::winbase::GetNamedPipeClientProcessId(raw_handle, &mut out_pid) };
|
||||
let r = unsafe {
|
||||
winapi::um::winbase::GetNamedPipeClientProcessId(
|
||||
// We need the `as` here to make rustdoc shut up
|
||||
// about winapi using different type defs for docs.
|
||||
raw_handle as winapi::um::winnt::HANDLE,
|
||||
&mut out_pid,
|
||||
)
|
||||
};
|
||||
|
||||
if r == 0 {
|
||||
Err(std::io::Error::last_os_error())
|
||||
|
Loading…
Reference in New Issue
Block a user