From 824ba56849b02ca1c0b81c677197ee5f2e5ef1d3 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:51:14 +0100 Subject: [PATCH] fix clippy beta (#4737) --- examples/Cargo.toml | 1 + pyo3-build-config/Cargo.toml | 1 + pyo3-build-config/src/impl_.rs | 6 +----- pyo3-ffi/Cargo.toml | 1 + pyo3-macros-backend/Cargo.toml | 1 + pyo3-macros/Cargo.toml | 1 + pytests/Cargo.toml | 1 + 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 81557e7f534..f6c77eb609c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -3,6 +3,7 @@ name = "pyo3-examples" version = "0.0.0" publish = false edition = "2021" +rust-version = "1.63" [dev-dependencies] pyo3 = { path = "..", features = ["auto-initialize", "extension-module"] } diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index cb2c6c6eebd..bcf8b1de2a6 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/pyo3/pyo3" categories = ["api-bindings", "development-tools::ffi"] license = "MIT OR Apache-2.0" edition = "2021" +rust-version = "1.63" [dependencies] once_cell = "1" diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index 4e5d3c10656..3a0915b4c8e 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -1122,11 +1122,7 @@ impl BuildFlags { Self( BuildFlags::ALL .iter() - .filter(|flag| { - config_map - .get_value(flag.to_string()) - .map_or(false, |value| value == "1") - }) + .filter(|flag| config_map.get_value(flag.to_string()) == Some("1")) .cloned() .collect(), ) diff --git a/pyo3-ffi/Cargo.toml b/pyo3-ffi/Cargo.toml index 76fa9e4b8e1..1a8cd7f09d7 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -10,6 +10,7 @@ categories = ["api-bindings", "development-tools::ffi"] license = "MIT OR Apache-2.0" edition = "2021" links = "python" +rust-version = "1.63" [dependencies] libc = "0.2.62" diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index d6daa874361..03c2ed0b189 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/pyo3/pyo3" categories = ["api-bindings", "development-tools::ffi"] license = "MIT OR Apache-2.0" edition = "2021" +rust-version = "1.63" # Note: we use default-features = false for proc-macro related crates # not to depend on proc-macro itself. diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 2db1c442d97..b85cc7e03c6 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/pyo3/pyo3" categories = ["api-bindings", "development-tools::ffi"] license = "MIT OR Apache-2.0" edition = "2021" +rust-version = "1.63" [lib] proc-macro = true diff --git a/pytests/Cargo.toml b/pytests/Cargo.toml index 255094a6c40..1fee3093275 100644 --- a/pytests/Cargo.toml +++ b/pytests/Cargo.toml @@ -5,6 +5,7 @@ version = "0.1.0" description = "Python-based tests for PyO3" edition = "2021" publish = false +rust-version = "1.63" [dependencies] pyo3 = { path = "../", features = ["extension-module"] }