688 Commits

Author SHA1 Message Date
bors[bot]
644653bf3b
Merge #339
339: Add polyfills for ESP32S2 r=korken89 a=Flole998



Co-authored-by: Flole998 <Flole998@users.noreply.github.com>
2023-01-23 17:48:16 +00:00
Flole998
02935035b1 Add polyfills for ESP32S2 2023-01-23 14:34:40 +00:00
bors[bot]
217456aeed
Merge #338
338: export all IndexMap iterators r=korken89 a=jeandudey

Exports all the iterator types of `IndexMap`.

I wonder if it'd make sense to have a module structure such as the one in `alloc::collections`, e.g.: `heapless::indexmap` and re-export `heapless::indexmap::IndexMap` on the crate root, to have all the iterator types inside the `indexmap` module but still public.

Co-authored-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-22 21:17:58 +00:00
Jean-Pierre De Jesus DIAZ
9fe93fd6d1
export all IndexMap iterators
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-20 13:45:17 +01:00
bors[bot]
cd23629904
Merge #337
337: Update spin dependency to newer version r=korken89 a=the-real-adammork

This updates `spin` to the newest version, this change helps us in one of our repos.

Co-authored-by: Adam Mork <adam@mobilecoin.com>
2023-01-13 08:37:58 +00:00
bors[bot]
8cc8cceef5
Merge #326
326: Recover StableDeref trait for pool::object::Object and pool::boxed::Box r=korken89 a=qwerty19106

I add ReadBuffer and WriteBuffer to pool::object::Object and pool::box::Box.
It allows to use embedded DMA of HAL crates, such as [stm32f4xx_hal::dma::Transfer](https://docs.rs/stm32f4xx-hal/latest/stm32f4xx_hal/dma/struct.Transfer.html).

Co-authored-by: Роман Кривенков <qwerty19106@gmail.com>
2023-01-13 08:27:09 +00:00
Роман Кривенков
8a57a69c9b Recover StableDeref trait for pool::object::Object and pool::boxed::Box 2023-01-12 11:05:41 +04:00
bors[bot]
f01eb295d4
Merge #327
327: Add HistoryBuffer::as_slices() r=korken89 a=hulthe

This method returns the contents of a HistoryBuffer as two ordered slices, similar to [Deque::as_slices()](https://docs.rs/heapless/0.7.16/heapless/struct.Deque.html#method.as_slices).

Co-authored-by: Joakim Hulthe <joakim@hulthe.net>
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2023-01-11 19:54:07 +00:00
Emil Fresk
61e6896cfc
Merge branch 'main' into histbuf_as_slices 2023-01-11 20:53:25 +01:00
bors[bot]
b3ddffbe2e
Merge #335
335: Implement retain for IndexSet/IndexMap. r=korken89 a=jeandudey

Needed to remove IndexMap/IndexSet elements while iterating over it.

Co-authored-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-11 19:45:27 +00:00
Joakim Hulthe
c35eaf742f
Add HistoryBuffer::as_slices to changelog 2023-01-11 16:17:09 +01:00
bors[bot]
d61ba3abd8
Merge #332
332: Export Iter from IndexSet and IndexMap r=korken89 a=jeandudey

Exports the `Iter` types for `IndexSet` and `IndexMap`.

My use case is having a trait generic over a `BTreeSet` and `IndexSet` which has a `type Iter`.

Co-authored-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-11 12:53:20 +00:00
Jean-Pierre De Jesus DIAZ
837f322515
export Iter from IndexSet and IndexMap 2023-01-11 13:42:03 +01:00
Joakim Hulthe
3b82dba21b
Add HistoryBuffer::as_slices()
Returns the contents of the buffer in two ordered slices.
2023-01-11 12:23:46 +01:00
Adam Mork
2726f63bdc
update spin dependency to newer version 2023-01-10 17:30:58 -08:00
bors[bot]
44a609fe75
Merge #331
331: Relax trait requirements on IndexMap/IndexSet. r=korken89 a=jeandudey

Some requirements are not necessary and the specification can be removed/simplified. This makes these types a bit more ergonomic when using them in a trait or function definition as not all traits need to be specified for some cases.

Co-authored-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-10 14:07:18 +00:00
Jean-Pierre De Jesus DIAZ
f7766eae67
implement retain for IndexMap/IndexSet
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-10 14:00:39 +01:00
Jean-Pierre De Jesus DIAZ
d5802449e5
relax trait requirements on IndexSet
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-10 12:00:01 +01:00
Jean-Pierre De Jesus DIAZ
c9cc18ada7
relax trait requirements on IndexMap
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-01-10 11:59:59 +01:00
Emil Fresk
2bf928643e
Merge pull request #336 from japaric/fix-ci2
Fix CI
2023-01-10 08:55:19 +01:00
Emil Fresk
b469290560 Fix CI 2023-01-10 08:48:46 +01:00
bors[bot]
62b122eb5b
Merge #323
323: spsc::Queue: make example less unsafe r=japaric a=japaric

closes #314

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-10-20 15:22:33 +00:00
Jorge Aparicio
3e4a253c84 spsc::Queue: make example less unsafe
closes #314
2022-10-20 17:21:10 +02:00
bors[bot]
8dcee5c728
Merge #322
322: clarify the iteration order of IndexMap / IndexSet r=japaric a=japaric

closes #321

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-10-20 14:53:04 +00:00
Jorge Aparicio
fdcfd4c2f1 clarify the iteration order of IndexMap / IndexSet
closes #321
2022-10-20 16:51:15 +02:00
Jorge Aparicio
df890b1a4b update test command in README 2022-10-18 13:50:22 +02:00
bors[bot]
f4c66a663b
Merge #315
315: revamp pool API r=japaric a=japaric

closes #286 
closes #167 
closes #318 

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-10-18 09:55:03 +00:00
Jorge Aparicio
8ef085a016 rm const_err lint 2022-10-18 11:52:44 +02:00
Jorge Aparicio
5ab41741fa document how to do array initialization 2022-10-18 11:43:51 +02:00
Jorge Aparicio
b7942b9c3b remove pool tsan test
tsan does not support the 32-bit x86 targets
2022-10-18 11:43:51 +02:00
Jorge Aparicio
fb3f34c04a revamp pool API 2022-10-18 11:43:50 +02:00
bors[bot]
5229dea4e7
Merge #320
320: switch to a more recent atomic-polyfill that compiles for AVR r=japaric a=japaric

cleaned up version of PR #313 
closes #313 

Co-authored-by: Robert Forsman <git@thoth.purplefrog.com>
Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-09-23 14:55:34 +00:00
Jorge Aparicio
c408a19fd0 update changelog 2022-09-23 16:46:11 +02:00
Jorge Aparicio
4cf4145b45 bump other atomic-polyfill versions 2022-09-23 16:40:52 +02:00
Robert Forsman
b0e4cb8af0 switch to a more recent atomic-polyfill that compiles for AVR 2022-09-23 16:28:32 +02:00
bors[bot]
4ac09626c1
Merge #316 #317
316: speed up cargo miri test r=japaric a=japaric

by making some "exhaustive" tests less exhaustive

317: impl {Clone, PartialEq} for HistoryBuffer {...} r=japaric a=finnbear

- `impl Clone for HistoryBuffer`
- `impl PartialEq for HistoryBuffer`

Both are tested fairly rigorously.

Motivation is to use this type in a `yew::Properties` struct, which requires both traits to be implemented.

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
Co-authored-by: Finn Bear <finnbearlabs@gmail.com>
2022-09-23 13:58:15 +00:00
bors[bot]
15e47d504f
Merge #319
319: update compile_fail test to work on 1.64 r=japaric a=japaric

should fix CI and unblock PRs like #317 

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-09-23 13:49:20 +00:00
Jorge Aparicio
e8940a1d0f update compile_fail test to work on 1.64 2022-09-23 15:41:59 +02:00
Finn Bear
5f8bab4b2c Edit changelog entry. 2022-09-22 19:50:18 -07:00
Finn Bear
0a21a56ad7 Fix Clone to preserve ordering, add Changelog entry. 2022-09-22 19:47:49 -07:00
Finn Bear
340e0cec99 HistoryBuffer::{clone, eq}. 2022-09-22 19:34:03 -07:00
Jorge Aparicio
4491015467 speed up cargo miri test
by making some "exhaustive" tests less exhaustive
2022-09-07 19:24:24 +02:00
bors[bot]
97ac129ba4
Merge #284
284: [breaking-change] use hash32 v0.3.0 r=japaric a=japaric

this release of `hash32` has the advantage that 32-bit hashers can be used to hash types that
implement the `core:#️⃣:Hash` trait removing the need for the `hash32::Hash` implementations in
this crate and the uses of the `#[derive(Hash32)]` macro (which did not support enums) in dependent
crates

with this change the following code works
``` rust
// NOTE no derive(Hash32)
#[derive(Hash)]
struct Int(i32);

let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0));
```

this change is technically a breaking change because the following code is no longer accepted

``` rust
// assume this type comes from a dependency
// NOTE no derive(Hash)
#[derive(Hash32)]
struct Int(i32);

let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0)); // error: does not implement Hash
```

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-08-12 14:40:16 +00:00
bors[bot]
9e2a79210d
Merge #311
311: ci: run miri tests first r=japaric a=japaric

it seems runners are assigned to jobs in the order they appear in the
yaml file. miri takes the longest so it's better if it appears first

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-08-12 14:31:58 +00:00
Jorge Aparicio
6652173268 don't test main after PRs are merged
this just duplicates the work of bors for no good reason
2022-08-12 16:30:44 +02:00
Jorge Aparicio
806ab5bf91 ci: run miri tests first
it seems runners are assigned to jobs in the order they appear in the
yaml file. miri takes the longest so it's better if it appears first
2022-08-12 16:28:17 +02:00
bors[bot]
71ab0fa0dc
Merge #310
310: rm MSRV r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2022-08-12 14:22:25 +00:00
Jorge Aparicio
aeb96a882b do not test MSRV 2022-08-12 16:12:22 +02:00
Jorge Aparicio
74951379e7 run cfail test on stable rather on MSRV 2022-08-12 16:12:12 +02:00
Jorge Aparicio
1301e43898 rm MSRV guarantee from docs 2022-08-12 16:02:59 +02:00