From 9572220f6c0df4629da278b71abaf0f94868e051 Mon Sep 17 00:00:00 2001 From: smheidrich Date: Sat, 24 Sep 2022 18:59:21 +0200 Subject: [PATCH 1/2] Fix links to ToPyObject in types docs --- src/types/floatob.rs | 2 +- src/types/num.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/floatob.rs b/src/types/floatob.rs index 31511d90..5939a8e1 100644 --- a/src/types/floatob.rs +++ b/src/types/floatob.rs @@ -10,7 +10,7 @@ use std::os::raw::c_double; /// Represents a Python `float` object. /// /// You can usually avoid directly working with this type -/// by using [`ToPyObject`](trait.ToPyObject.html) +/// by using [`ToPyObject`](crate::conversion::ToPyObject) /// and [extract](struct.PyAny.html#method.extract) /// with `f32`/`f64`. #[repr(transparent)] diff --git a/src/types/num.rs b/src/types/num.rs index e28b795b..93d18804 100644 --- a/src/types/num.rs +++ b/src/types/num.rs @@ -46,7 +46,7 @@ macro_rules! int_fits_larger_int { /// Represents a Python `int` object. /// /// You can usually avoid directly working with this type -/// by using [`ToPyObject`](trait.ToPyObject.html) +/// by using [`ToPyObject`](crate::conversion::ToPyObject) /// and [extract](struct.PyAny.html#method.extract) /// with the primitive Rust integer types. #[repr(transparent)] From bc00e9ff12e794c5ba95d658c9e3c697811c64a2 Mon Sep 17 00:00:00 2001 From: smheidrich Date: Sat, 24 Sep 2022 20:59:04 +0200 Subject: [PATCH 2/2] Improve PyLong/PyFloat doc links to PyAny::extract --- src/types/floatob.rs | 2 +- src/types/num.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/floatob.rs b/src/types/floatob.rs index 5939a8e1..ba551a3f 100644 --- a/src/types/floatob.rs +++ b/src/types/floatob.rs @@ -11,7 +11,7 @@ use std::os::raw::c_double; /// /// You can usually avoid directly working with this type /// by using [`ToPyObject`](crate::conversion::ToPyObject) -/// and [extract](struct.PyAny.html#method.extract) +/// and [`extract`](PyAny::extract) /// with `f32`/`f64`. #[repr(transparent)] pub struct PyFloat(PyAny); diff --git a/src/types/num.rs b/src/types/num.rs index 93d18804..7b6c1b73 100644 --- a/src/types/num.rs +++ b/src/types/num.rs @@ -47,7 +47,7 @@ macro_rules! int_fits_larger_int { /// /// You can usually avoid directly working with this type /// by using [`ToPyObject`](crate::conversion::ToPyObject) -/// and [extract](struct.PyAny.html#method.extract) +/// and [`extract`](PyAny::extract) /// with the primitive Rust integer types. #[repr(transparent)] pub struct PyLong(PyAny);