From a561090b76b7fe0eb5b75f35c4e3f41c44666553 Mon Sep 17 00:00:00 2001 From: Filipe Rodrigues Date: Tue, 14 Jul 2020 17:25:18 +0100 Subject: [PATCH] Removed nightly feature `const_if_match`, as it's stable as of rust `1.45.0`. --- src/game/bytes.rs | 2 +- src/game/util.rs | 1 + src/lib.rs | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/game/bytes.rs b/src/game/bytes.rs index 14ff003..7c08d7d 100644 --- a/src/game/bytes.rs +++ b/src/game/bytes.rs @@ -16,7 +16,7 @@ where { /// The type of array required by this structure /// - /// *MUST* be a `[u8; N]` + /// *MUST* be a `[u8; N]` or `u8` type ByteArray: Sized; /// The error type used for the operation diff --git a/src/game/util.rs b/src/game/util.rs index 053edab..6fcf884 100644 --- a/src/game/util.rs +++ b/src/game/util.rs @@ -156,6 +156,7 @@ pub fn read_maybe_null_ascii_string(buf: &impl AsRef<[u8]>) -> Result<&ascii::As /// Error type for [`write_null_ascii_string`] #[derive(PartialEq, Eq, Clone, Copy, Debug, thiserror::Error)] +#[allow(clippy::missing_docs_in_private_items)] pub enum WriteNullAsciiStringError { /// The input string was too large #[error("Input string was too large for buffer. ({}+1 / {})", input_len, buffer_len)] diff --git a/src/lib.rs b/src/lib.rs index 609134d..9a2ee59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,6 @@ decl_macro, stmt_expr_attributes, unwrap_infallible, - const_if_match, exclusive_range_pattern, external_doc )] @@ -53,7 +52,7 @@ #![allow(clippy::shadow_reuse, clippy::shadow_same)] // We use `.expect("...")` when we either know we cannot panic or it // is the safest alternative, as proceeding would corrupt the program state. -#![allow(clippy::result_expect_used, clippy::option_expect_used)] +#![allow(clippy::expect_used)] // Like-wise with `.expect()`, we use `unreachable!` when we know a branch // if unreachable, and if it ever does get reached, panicking would be the // safest option @@ -92,7 +91,6 @@ #![allow(clippy::integer_arithmetic)] // TODO: Remove once fixed #![allow( - clippy::missing_docs_in_private_items, clippy::as_conversions, clippy::cast_possible_wrap, clippy::cast_sign_loss,