Skip to content

Commit

Permalink
clippy: Fix doc_markdown warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Nov 23, 2023
1 parent 78883c7 commit 0ec230e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/com.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ where
fn as_unknown(&self) -> &IUnknown {
unsafe { &*(self.0 as *mut IUnknown) }
}
/// Performs QueryInterface fun.
/// Performs `QueryInterface` fun.
pub fn cast<U>(&self) -> Result<ComPtr<U>, i32>
where
U: Interface,
Expand Down
13 changes: 7 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ impl Build {
/// `true`.
///
/// The name of the C++ standard library to link is decided by:
/// 1. If [cpp_link_stdlib](Build::cpp_link_stdlib) is set, use its value.
/// 1. If [`cpp_link_stdlib`](Build::cpp_link_stdlib) is set, use its value.
/// 2. Else if the `CXXSTDLIB` environment variable is set, use its value.
/// 3. Else the default is `libc++` for OS X and BSDs, `libc++_shared` for Android,
/// `None` for MSVC and `libstdc++` for anything else.
Expand All @@ -708,7 +708,7 @@ impl Build {
/// the most common compiler flags, e.g. `-std=c++17`, some project-specific
/// flags might have to be prefixed with "-Xcompiler" flag, for example as
/// `.flag("-Xcompiler").flag("-fpermissive")`. See the documentation for
/// `nvcc`, the CUDA compiler driver, at https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/
/// `nvcc`, the CUDA compiler driver, at <https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/>
/// for more information.
///
/// If enabled, this also implicitly enables C++ support.
Expand Down Expand Up @@ -1044,7 +1044,7 @@ impl Build {
/// Adds a native library modifier that will be added to the
/// `rustc-link-lib=static:MODIFIERS=LIBRARY_NAME` metadata line
/// emitted for cargo if `cargo_metadata` is enabled.
/// See https://doc.rust-lang.org/rustc/command-line-arguments.html#-l-link-the-generated-crate-to-a-native-library
/// See <https://doc.rust-lang.org/rustc/command-line-arguments.html#-l-link-the-generated-crate-to-a-native-library>
/// for the list of modifiers accepted by rustc.
pub fn link_lib_modifier(&mut self, link_lib_modifier: &str) -> &mut Build {
self.link_lib_modifiers.push(link_lib_modifier.into());
Expand Down Expand Up @@ -1599,7 +1599,8 @@ impl Build {

/// Get the compiler that's in use for this configuration.
///
/// This will return a result instead of panicing; see get_compiler() for the complete description.
/// This will return a result instead of panicing; see
/// [`get_compiler()`](Self::get_compiler) for the complete description.
pub fn try_get_compiler(&self) -> Result<Tool, Error> {
let opt_level = self.get_opt_level()?;
let target = self.get_target()?;
Expand Down Expand Up @@ -2797,7 +2798,7 @@ impl Build {
}

/// Returns the C++ standard library:
/// 1. If [cpp_link_stdlib](cc::Build::cpp_link_stdlib) is set, uses its value.
/// 1. If [`cpp_link_stdlib`](cc::Build::cpp_link_stdlib) is set, uses its value.
/// 2. Else if the `CXXSTDLIB` environment variable is set, uses its value.
/// 3. Else the default is `libc++` for OS X and BSDs, `libc++_shared` for Android,
/// `None` for MSVC and `libstdc++` for anything else.
Expand Down Expand Up @@ -3623,7 +3624,7 @@ impl Tool {
///
/// Nvidia compiler accepts only the most common compiler flags like `-D`,
/// `-I`, `-c`, etc. Options meant specifically for the underlying
/// host C++ compiler have to be prefixed with '-Xcompiler`.
/// host C++ compiler have to be prefixed with `-Xcompiler`.
/// [Another possible future application for this function is passing
/// clang-specific flags to clang-cl, which otherwise accepts only
/// MSVC-specific options.]
Expand Down
8 changes: 4 additions & 4 deletions src/os_pipe.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Adapted from:
//! - https://doc.rust-lang.org/src/std/sys/unix/pipe.rs.html
//! - https://doc.rust-lang.org/src/std/sys/unix/fd.rs.html#385
//! - https://github.com/rust-lang/rust/blob/master/library/std/src/sys/mod.rs#L57
//! - https://github.com/oconnor663/os_pipe.rs
//! - <https://doc.rust-lang.org/src/std/sys/unix/pipe.rs.html>
//! - <https://doc.rust-lang.org/src/std/sys/unix/fd.rs.html#385>
//! - <https://github.com/rust-lang/rust/blob/master/library/std/src/sys/mod.rs#L57>
//! - <https://github.com/oconnor663/os_pipe.rs>
use std::fs::File;

/// Open a new pipe and return a pair of [`File`] objects for the reader and writer.
Expand Down
2 changes: 1 addition & 1 deletion src/os_pipe/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{fs::File, io, os::windows::prelude::*, ptr};
/// NOTE: These pipes do not support IOCP.
///
/// If IOCP is needed, then you might want to emulate
/// anonymous pipes with CreateNamedPipe, as Rust's stdlib does.
/// anonymous pipes with `CreateNamedPipe`, as Rust's stdlib does.
pub(super) fn pipe() -> io::Result<(File, File)> {
let mut read_pipe = INVALID_HANDLE_VALUE;
let mut write_pipe = INVALID_HANDLE_VALUE;
Expand Down
2 changes: 1 addition & 1 deletion src/winapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::os::raw;

pub type wchar_t = u16;

pub use crate::windows_sys::{FILETIME, GUID, HRESULT, SAFEARRAY, SAFEARRAYBOUND};
pub use crate::windows_sys::{FILETIME, GUID, HRESULT, SAFEARRAY};

pub type REFIID = *const IID;
pub type IID = GUID;
Expand Down

0 comments on commit 0ec230e

Please sign in to comment.