541 Commits

Author SHA1 Message Date
Emil Fresk
98b7dd41f8 Release 0.7.10 v0.7.10 2022-01-21 12:03:14 +01:00
Emil Fresk
4a204da35d
Merge pull request #267 from TDHolmes/allow-non-x86-hosts
assume native compilation if target_os is not "none" to allow non-x86 hosts to run tests
2022-01-21 11:46:23 +01:00
Tyler Holmes
5cf74504da
Merge branch 'master' into allow-non-x86-hosts 2022-01-20 09:59:22 -08:00
Tyler Holmes
db3e2b98ed
Update CHANGELOG.md 2022-01-20 09:58:43 -08:00
Emil Fresk
70cecc4147
Merge pull request #265 from TDHolmes/cas-fixup
Add cas support for risc-v via atomic-polyfill and fix mpmc/pool documentation
2022-01-19 14:59:12 +01:00
Tyler Holmes
bc9e208089 differentiate full vs CAS polyfill 2022-01-17 11:32:13 -08:00
Tyler Holmes
a68ce63fbe changelog 2022-01-17 11:32:12 -08:00
Tyler Holmes
58e020a287 have docs.rs document the optional features 2022-01-17 11:31:40 -08:00
Tyler Holmes
a469645439 fix documentation 2022-01-17 11:31:40 -08:00
Tyler Holmes
63c0370d69 add riscv cas atomic support and cleanup the #cfg's for it 2022-01-17 11:31:40 -08:00
Emil Fresk
7546c64e79
Merge pull request #266 from finnbear/feature/historybuf_ordered_iterator
Feature/historybuf `OldestOrdered` iterator
2022-01-17 08:11:52 +01:00
Tyler Holmes
2bee731ed1 assume native compilation if target_os is not "none" to allow non-x86 hosts to run tests 2022-01-16 14:56:00 -08:00
Finn Bear
4d0a160638
Merge branch 'master' into feature/historybuf_ordered_iterator 2022-01-15 23:34:01 -08:00
Finn Bear
60da0951f3 Changelog. 2022-01-15 23:32:03 -08:00
Finn Bear
55a1ec9ea3 Cleanup tests. 2022-01-15 16:58:10 -08:00
Finn Bear
4132b5115c Fix termination behavior and add comprehensive test cases. 2022-01-15 16:41:33 -08:00
Finn Bear
77adbab007 Fix panic if buffer was empty. 2022-01-15 15:48:05 -08:00
Emil Fresk
e33646c189 Add changelog enforcer 2022-01-10 08:27:52 +01:00
Emil Fresk
0eff6364fb
Merge pull request #254 from eivindbergem/master
Implemented sealed traits according to Rust API Guidelines
2022-01-10 08:27:02 +01:00
Emil Fresk
180db255c7
Merge pull request #261 from haata/zero_capacity_vec
Relax Vec bounds to allow for zero-length Vecs
2022-01-10 08:26:03 +01:00
Jacob Alexander
0b92953ef1 Adding is_empty and is_full tests for zero capacity 2021-12-29 12:01:45 -08:00
Jacob Alexander
bc2cd1be70 Relax Vec bounds to allow for zero-length Vecs
Use when building generated code where it's possible to have a zero
length array/vector (e.g. wire-format). See #252

- Added vec::tests::zero_capacity test
- Added sealed::greater_than_eq_0
2021-12-28 11:11:20 -08:00
Eivind Alexander Bergem
df0a0af884 Implemented sealed traits according to Rust API Guidelines 2021-12-16 16:16:30 +01:00
Emil Fresk
f3af76d607
Merge pull request #260 from japaric/fix-index-structs
Fix bounds in IndexMap and IndexSet, IndexSet::new() is now const
v0.7.9
2021-12-16 10:57:58 +01:00
Emil Fresk
318da23c43 Fix bounds in IndexMap and IndexSet, IndexSet::new() is now const 2021-12-16 10:37:23 +01:00
Emil Fresk
e3c536b3c2
Merge pull request #255 from robinkrahl/vec-try-from
Implement TryFrom<&[T]> for Vec<T, N>
2021-11-24 16:11:29 +01:00
Robin Krahl
a9756bd652
Implement TryFrom<&[T]> for Vec<T, N>
There already is the Vec::from_slice method that does the same, but
implementing the TryFrom trait makes it easier to write code that works
both with heapless::Vec and std::vec::Vec.
2021-11-23 12:54:55 +01:00
Donny Zimmanck
ae103535d3 Added doc string to the OrderedIter struct 2021-11-12 13:30:58 -08:00
Donny Zimmanck
8b320e64e7 Derive the clone trait for the OrderedIter making it easy for users to use an iterator on a History Buffer more than once. 2021-11-12 12:54:53 -08:00
Donny Zimmanck
6a8fa3a475 Expose the OrderedIterator for external use. 2021-11-12 11:37:14 -08:00
Donny Zimmanck
21a856d434 Added a ordered() method to the History Buffer which returns an iterator on the data that starts from the oldest data and stops at the last data entered. 2021-11-12 10:14:12 -08:00
Emil Fresk
f3175ee2f6
Merge pull request #251 from japaric/defmt-version-span
defmt version range
v0.7.8
2021-11-11 10:40:13 +01:00
Emil Fresk
cd754b7936 Support defmt version range (0.2 and 0.3) 2021-11-11 10:25:10 +01:00
Emil Fresk
8a77f3237f
Merge pull request #246 from Dirbaio/ci-miri
Run tests with MIRI in CI
2021-09-29 09:03:38 +02:00
Dario Nieuwenhuis
932760f3b7 Run tests with MIRI in CI 2021-09-24 23:48:36 +02:00
Emil Fresk
80cbe663f5
Merge pull request #244 from chemicstry/master
Fix MPMC size asserts
2021-09-22 21:14:31 +02:00
chemicstry
bd3cbaba61 Fix MPMC size asserts 2021-09-22 17:48:53 +03:00
Emil Fresk
1c1dd43e08 Preparing 0.7.7 release v0.7.7 2021-09-22 07:12:04 +02:00
Emil Fresk
23627b9dd0 Prepare v0.7.6 release v0.7.6 2021-09-21 17:43:21 +02:00
Emil Fresk
95f122a0d9
Merge pull request #241 from japaric/arc-thumbv6
Allow arc pool on thumbv6
2021-09-21 17:39:21 +02:00
Emil Fresk
751f24e928 Allow arc pool on thumbv6 2021-09-21 17:32:45 +02:00
Emil Fresk
3adc93a605
Merge pull request #242 from japaric/fix-miri
fix miri errors
2021-09-20 09:10:42 +02:00
Jorge Aparicio
8cf5a26347 use plain arithmetic instead of ptr::offset API
the offset from the anchor was computed used plain arithmetic
so to do the reverse (go from offset to a pointer) also use plain arithmetic

we were using the offset API for the reverse operation but miri doesn't like that: it consider the
pointer to be out of bounds wrt to the ANCHOR static variable
2021-09-15 11:08:39 +02:00
Jorge Aparicio
aa017a5606 fix ZST check in Pool::grow
Node<T> always has non-zero size; we want to check the size of the data T
2021-09-15 11:06:36 +02:00
Jorge Aparicio
0717a8c1ce avoid pointer arithmetic on pool::Box node when handling ZST 2021-09-15 11:05:28 +02:00
Emil Fresk
d3be154506
Merge pull request #240 from Dirbaio/miri-fixes
Miri fixes
2021-09-13 08:39:35 +02:00
Dario Nieuwenhuis
4c203532ba Ignore slow tests when running in miri.
There's a few tests that do millions of iterations. Miri is incredibly
slow and takes too long to run these (I gave up waiting after 5+ minutes),
so we ignore them when testing with miri.
2021-09-13 01:22:38 +02:00
Dario Nieuwenhuis
c98804daec deque: Fix miri error due to too small raw pointer borrow.
`&mut buffer[0]` only grants access to the first item, we need access
to the entire buffer.
2021-09-13 01:22:38 +02:00
Dario Nieuwenhuis
350e112db0 deque: fix miri error with raw-borrowing twice.
When you take a raw pointer, previous raw pointers are invalidated.
We get the pointer just once and use it twice.
2021-09-13 00:41:26 +02:00
Emil Fresk
0738b3cefc
Merge pull request #238 from japaric/arc-pool
add Arc pointer backed by a memory pool
2021-09-10 16:27:40 +02:00