From db03cf870c71a958438d8dbee6ba4f273b3cb685 Mon Sep 17 00:00:00 2001 From: jonay2000 Date: Sat, 10 Jun 2023 13:08:06 +0200 Subject: [PATCH] readme and some comments --- README.md | 6 +++--- src/with_alloc/alloc_ringbuffer.rs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) 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;