From: Miguel Ojeda Date: Sun, 5 Apr 2026 23:52:51 +0000 (+0200) Subject: rust: macros: simplify code using `feature(extract_if)` X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42ec980024f03bad6fd97d65c22f6cf32fb08c58;p=thirdparty%2Fkernel%2Flinux.git rust: macros: simplify code using `feature(extract_if)` `feature(extract_if)` [1] was stabilized in Rust 1.87.0 [2], and the last significant change happened in Rust 1.85.0 [3] when the range parameter was added. That is, with our new minimum version, we can start using the feature. Thus simplify the code using the feature and remove the TODO comment. Suggested-by: Gary Guo Link: https://lore.kernel.org/rust-for-linux/DHHVSX66206Y.3E7I9QUNTCJ8I@garyguo.net/ Link: https://github.com/rust-lang/rust/issues/43244 [1] Link: https://github.com/rust-lang/rust/pull/137109 [2] Link: https://github.com/rust-lang/rust/pull/133265 [3] Link: https://patch.msgid.link/20260405235309.418950-16-ojeda@kernel.org Reviewed-by: Tamir Duberstein Signed-off-by: Miguel Ojeda --- diff --git a/rust/macros/kunit.rs b/rust/macros/kunit.rs index 6be880d634e26..ae20ed6768f15 100644 --- a/rust/macros/kunit.rs +++ b/rust/macros/kunit.rs @@ -87,10 +87,11 @@ pub(crate) fn kunit_tests(test_suite: Ident, mut module: ItemMod) -> Result= 1.88.0.