aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-14 17:50:15 -0400
committerBrian Cully <bjc@kublai.com>2019-08-14 17:50:15 -0400
commit3f23bd3113c99cfddedfa6921db2bab5ddccb6de (patch)
treeed50410658053d775357fad3c9c214212eb8f90b /src
parent1a5a65fad3a550f5e72c5a03e792c7fa9ad43380 (diff)
downloadstarb-3f23bd3113c99cfddedfa6921db2bab5ddccb6de.tar.gz
starb-3f23bd3113c99cfddedfa6921db2bab5ddccb6de.zip
Remove un-needed feature gate.
This should work on stable now.
Diffstat (limited to 'src')
-rw-r--r--[-rwxr-xr-x]src/lib.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5f9bd11..164a575 100755..100644
--- 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)]