From 2564ca4e7558396f166837d8795f8e1bfd698007 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Tue, 2 Jan 2024 09:52:45 +0100 Subject: [PATCH] Fix missing feature flags in implementation of Either conversion. --- src/conversions/either.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conversions/either.rs b/src/conversions/either.rs index 4a41d2bd..759b282e 100644 --- a/src/conversions/either.rs +++ b/src/conversions/either.rs @@ -43,9 +43,10 @@ //! //! [either](https://docs.rs/either/ "A library for easy idiomatic error handling and reporting in Rust applications")’s +#[cfg(feature = "experimental-inspect")] +use crate::inspect::types::TypeInfo; use crate::{ - exceptions::PyTypeError, inspect::types::TypeInfo, FromPyObject, IntoPy, PyAny, PyObject, - PyResult, Python, ToPyObject, + exceptions::PyTypeError, FromPyObject, IntoPy, PyAny, PyObject, PyResult, Python, ToPyObject, }; use either::Either; @@ -97,6 +98,7 @@ where } } + #[cfg(feature = "experimental-inspect")] fn type_input() -> TypeInfo { TypeInfo::union_of(&[L::type_input(), R::type_input()]) }