diff --git a/README.md b/README.md index 612851a..b7d00e2 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ compared here can grow unbounded (though in benchmarks they weren't filled over # Features -| name | default | description | -|-------|---------|--------------------------------------------------------------------------------------------------------------| -| alloc | ✓ | Disable this feature to remove the dependency on alloc. Disabling this feature makes `ringbuffer` `no_std`. | +| name | default | description | +|-------|---------|------------------------------------------------------------------------------------------------------------| +| alloc | ✓ | Disable this feature to remove the dependency on alloc. | # License diff --git a/src/with_alloc/alloc_ringbuffer.rs b/src/with_alloc/alloc_ringbuffer.rs index df6f886..7e697cd 100644 --- a/src/with_alloc/alloc_ringbuffer.rs +++ b/src/with_alloc/alloc_ringbuffer.rs @@ -324,6 +324,7 @@ unsafe impl RingBuffer for AllocRingBuffer #[inline] fn fill_with T>(&mut self, mut f: F) { + // This clear is necessary so that the drop methods are called. self.clear(); self.readptr = 0;