From f0f15edc4ea2505c4ebd8e329aa56cf5d433ddde Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:36:24 +0100 Subject: [PATCH] remove some redundant explicit doc links --- pyo3-build-config/src/impl_.rs | 2 +- src/types/floatob.rs | 3 +-- src/types/module.rs | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index 21b65b6e..e9c9f5a8 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -1129,7 +1129,7 @@ impl Sysconfigdata { /// The sysconfigdata is simply a dictionary containing all the build time variables used for the /// python executable and library. This function necessitates a python interpreter on the host /// machine to work. Here it is read into a `Sysconfigdata` (hash map), which can be turned into an -/// [`InterpreterConfig`](InterpreterConfig) using +/// [`InterpreterConfig`] using /// [`from_sysconfigdata`](InterpreterConfig::from_sysconfigdata). pub fn parse_sysconfigdata(sysconfigdata_path: impl AsRef) -> Result { let sysconfigdata_path = sysconfigdata_path.as_ref(); diff --git a/src/types/floatob.rs b/src/types/floatob.rs index 252c5757..73e182aa 100644 --- a/src/types/floatob.rs +++ b/src/types/floatob.rs @@ -8,8 +8,7 @@ use std::os::raw::c_double; /// Represents a Python `float` object. /// /// You can usually avoid directly working with this type -/// by using [`ToPyObject`](crate::conversion::ToPyObject) -/// and [`extract`](PyAny::extract) +/// by using [`ToPyObject`] and [`extract`](PyAny::extract) /// with `f32`/`f64`. #[repr(transparent)] pub struct PyFloat(PyAny); diff --git a/src/types/module.rs b/src/types/module.rs index 5f9ed1f6..701a9131 100644 --- a/src/types/module.rs +++ b/src/types/module.rs @@ -86,9 +86,9 @@ impl PyModule { /// Returns `PyErr` if: /// - `code` is not syntactically correct Python. /// - Any Python exceptions are raised while initializing the module. - /// - Any of the arguments cannot be converted to [`CString`](std::ffi::CString)s. + /// - Any of the arguments cannot be converted to [`CString`]s. /// - /// # Example: bundle in a file at compile time with [`include_str!`][1]: + /// # Example: bundle in a file at compile time with [`include_str!`][std::include_str]: /// /// ```rust /// use pyo3::prelude::*; @@ -105,7 +105,7 @@ impl PyModule { /// # } /// ``` /// - /// # Example: Load a file at runtime with [`std::fs::read_to_string`][2]. + /// # Example: Load a file at runtime with [`std::fs::read_to_string`]. /// /// ```rust /// use pyo3::prelude::*; @@ -123,9 +123,6 @@ impl PyModule { /// Ok(()) /// # } /// ``` - /// - /// [1]: std::include_str - /// [2]: std::fs::read_to_string pub fn from_code<'p>( py: Python<'p>, code: &str,