diff options
| author | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
|---|---|---|
| committer | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
| commit | 7976f950b0de72c521f92efa350c67ccd197fab9 (patch) | |
| tree | 8759312eb000de09b92a4921f476d5c16b7e7342 /embassy-sync/src/ring_buffer.rs | |
| parent | 828a8df18d04877df1f55f04354980b28ff2f2f8 (diff) | |
Merge branch 'main' into 17-add-support-for-boot-protocol
Diffstat (limited to 'embassy-sync/src/ring_buffer.rs')
| -rw-r--r-- | embassy-sync/src/ring_buffer.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embassy-sync/src/ring_buffer.rs b/embassy-sync/src/ring_buffer.rs index f03b7dd8f..608447cd6 100644 --- a/embassy-sync/src/ring_buffer.rs +++ b/embassy-sync/src/ring_buffer.rs | |||
| @@ -95,11 +95,7 @@ impl<const N: usize> RingBuffer<N> { | |||
| 95 | 95 | ||
| 96 | fn wrap(&self, n: usize) -> usize { | 96 | fn wrap(&self, n: usize) -> usize { |
| 97 | assert!(n <= N); | 97 | assert!(n <= N); |
| 98 | if n == N { | 98 | if n == N { 0 } else { n } |
| 99 | 0 | ||
| 100 | } else { | ||
| 101 | n | ||
| 102 | } | ||
| 103 | } | 99 | } |
| 104 | } | 100 | } |
| 105 | 101 | ||
