[PATCH] rust: zerocopy-derive: Remove the BoolExt trait

Elouan Da Costa Peixoto <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
FIXME comment was saying that this needed to
be removed once the MSRV >= 1.62.
The current MSRV is 1.85.0 obtained by using:
`scripts/min-tool-version.sh rustc` command.

Signed-off-by: Elouan Da Costa Peixoto <[email protected]>
---
 rust/zerocopy-derive/util.rs | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/rust/zerocopy-derive/util.rs b/rust/zerocopy-derive/util.rs
index 5c5e9d3bdcb8..47aa9f78bd4a 100644
--- a/rust/zerocopy-derive/util.rs
+++ b/rust/zerocopy-derive/util.rs
@@ -713,22 +713,6 @@ fn only_derive_is_allowed_to_implement_this_trait() {}
 // The `#[allow(unused)]` is necessary because, on sufficiently recent toolchain
 // versions, `b.then_some(...)` resolves to the inherent method rather than to
 // this trait, and so this trait is considered unused.
-//
-// FIXME(#67): Remove this once our MSRV is >= 1.62.
-#[allow(unused)]
-trait BoolExt {
-    fn then_some<T>(self, t: T) -> Option<T>;
-}
-
-impl BoolExt for bool {
-    fn then_some<T>(self, t: T) -> Option<T> {
-        if self {
-            Some(t)
-        } else {
-            None
-        }
-    }
-}
 
 pub(crate) fn const_block(items: impl IntoIterator<Item = Option<TokenStream>>) -> TokenStream {
     let items = items.into_iter().flatten();
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.