From c96928f502663f5b5486aa99956d2dc0d880f555 Mon Sep 17 00:00:00 2001 From: Brian Petersen Date: Fri, 5 May 2023 12:15:17 -0600 Subject: [PATCH] Removes const_fn feature Since this feature of Rust has stabilized, it can be removed. If left, compilation errors occur for users of the library. --- Cargo.toml | 3 --- src/lib.rs | 2 -- 2 files changed, 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f1b1403..efe5956 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,3 @@ repository = "https://github.com/whitequark/rust-log_buffer" homepage = "https://github.com/whitequark/rust-log_buffer" documentation = "https://whitequark.github.io/rust-log_buffer/log_buffer" description = "A zero-allocation ring buffer for storing text logs" - -[features] -const_fn = [] diff --git a/src/lib.rs b/src/lib.rs index 0e7e2d6..6cf2c63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,6 @@ //! ``` #![no_std] -#![cfg_attr(feature = "const_fn", feature(const_fn))] /// A ring buffer that stores UTF-8 text. /// @@ -67,7 +66,6 @@ impl + AsMut<[u8]>> LogBuffer { /// The buffer is *not* cleared after creation, and contains whatever is in `storage`. /// The `clear()` method should be called before use. /// However, this function can be used in a static initializer. - #[cfg(feature = "const_fn")] pub const fn uninitialized(storage: T) -> LogBuffer { LogBuffer { buffer: storage, position: 0 } }