From 3f23bd3113c99cfddedfa6921db2bab5ddccb6de Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 14 Aug 2019 17:50:15 -0400 Subject: Remove un-needed feature gate. This should work on stable now. --- src/lib.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) mode change 100755 => 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs old mode 100755 new mode 100644 index 5f9bd11..164a575 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,9 @@ -// FIXME: Currently RingBuffer requires its type parameter to be -// `Copy` because items are stored in a fixed-length array (which, -// itself, is required to allow creating RingBuffers -// statically). There may be work-arounds with ptr routines, and it -// should be investigated. +//! An implementation of STAtically allocated Ring Buffers. +//! +//! This is a simple ring-buffer structure that lives on the stack, +//! rather than the heap, so that it can be used in `no-std` +//! environments, such as embedded. #![no_std] -#![feature(const_fn)] use core::{ cell::UnsafeCell, @@ -20,7 +19,7 @@ use core::{ /// time so it can be statically allocated or created on the stack. /// /// This will disappear when const generics appear. -const CAPACITY: usize = 1024; +pub const CAPACITY: usize = 1024; /// Errors that can be made when interacting with the ring buffer. #[derive(Debug, PartialEq)] -- cgit v1.2.3