469 Commits

Author SHA1 Message Date
Danilo Bargen
5e32bf7244 Implement Vec::starts_with and Vec::ends_with 2020-04-30 13:58:00 +02:00
bors[bot]
253cd89228
Merge #151
151: Implement Vec::from_slice r=korken89 a=dbrgn

Fixes #150.

Co-authored-by: Danilo Bargen <mail@dbrgn.ch>
2020-04-30 10:54:24 +00:00
Danilo Bargen
779564cb9f Implement Vec::from_slice 2020-04-30 11:07:55 +02:00
bors[bot]
4d613da755
Merge #136
136: add the HistoryBuffer type r=korken89 a=birkenfeld

Closes #112

Unfortunately `const` construction won't work since the `Default` or `Clone` bound on `T` can't be used then, so I've not added an internal type to `i.rs`.

Let me know if you think any other traits should be implemented...

Co-authored-by: Georg Brandl <georg@python.org>
2020-04-30 09:01:34 +00:00
Willem
7a369f3e5c indexmap: expose PowerOfTwo, Bucket and Pos
This change allows the create custom structs with size arguments outside
the heapless crate itself.
2020-04-22 10:01:05 +02:00
Bryan Kadzban
de0ef160ea Make Producer<..., SingleCore> Send, like Consumer
I assume there's no reason that only multi-core Producers are marked
Send, while Consumers are not (they're pretty symmetrical).
2020-04-11 21:23:57 -07:00
Emil Fresk
3d20301aec
Merge pull request #148 from japaric/v0.5.4_release
Preparing for v0.5.4
v0.5.4
2020-04-06 22:24:07 +02:00
Emil Fresk
f7f0dcdb44 Preparing for v0.5.4 2020-04-06 20:57:27 +02:00
bors[bot]
4e960b30bc
Merge #147
147: Implement StableDeref for singleton::Box r=korken89 a=thalesfragoso

There was a discussion in the riot channel about what it's needed for a buffer to be DMA safe, where ra_kete came up with this POC:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=339a9a29fb59c080b42b6d77a902acb6

Where it seems that the requirements described in the [Embedonomicon](https://docs.rust-embedded.org/embedonomicon/dma.html#static-bound) doesn't seem to be enough to prevent stack corruption.

If that is really the case and we decide to use `StableDeref` instead, then a implementation for Box is very important to be able to easily use it on DMA APIs and a new point release would be necessary.

CC @korken89 

Co-authored-by: thalesfragoso <thales.fragosoz@gmail.com>
2020-04-06 18:47:40 +00:00
thalesfragoso
bb712eb2b0 Implement StableDeref for singleton::Box 2020-04-06 15:24:37 -03:00
bors[bot]
e3f02b06b2
Merge #145
145: Made Box StableDeref r=japaric a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-03-25 06:00:21 +00:00
Emil Fresk
b45ea9bd18 Made box StableDeref 2020-03-24 13:05:51 +01:00
ijl
64e891330c Implement core::fmt::Write for heapless::Vec<u8, N> 2020-02-11 13:51:25 +00:00
bors[bot]
1d6c207917
Merge #142
142: Extend the ARMv7-A `Pool` support to the bare-metal `armv7a-` targets. r=japaric a=japaric

The built-in rustc targets ended with names that start with `armv7a-` so #140
does not cover them though the intention was to support them; this commit fixes
that

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
v0.5.3
2020-01-27 11:11:01 +00:00
Jorge Aparicio
7de6f7907d Extend the ARMv7-A Pool support to the bare-metal armv7a- targets.
The built-in rustc targets ended with names that start with `armv7a-` so #140
does not cover them though the intention was to support them; this commit fixes
that
2020-01-27 12:08:15 +01:00
Jorge Aparicio
f32038d3bb v0.5.2 v0.5.2 2020-01-15 11:57:49 +01:00
bors[bot]
b6bd3af38d
Merge #140
140: extend singleton pool! support to ARMv7-A r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
2020-01-15 10:49:57 +00:00
Jorge Aparicio
646c56545d extend singleton pool! support to ARMv7-A 2020-01-15 11:47:55 +01:00
Georg Brandl
1625603982 reduce HistoryBuffer API as discussed in PR 2020-01-07 08:28:06 +01:00
Georg Brandl
1028563155 add the HistoryBuffer type 2020-01-07 08:14:52 +01:00
bors[bot]
f9689ffdbe
Merge #137
137: run cargo fmt r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-12-18 11:42:26 +00:00
Jorge Aparicio
cb8179a30e run cargo fmt 2019-12-18 12:41:17 +01:00
bors[bot]
3fdd3e8635
Merge #135
135: remove spsc / pool / mpmc modules on targets w/o atomic / CAS support r=japaric a=japaric

closes #123

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-12-18 11:02:40 +00:00
Jorge Aparicio
ef331612ee test the riscv32imc-unknown-none-elf target 2019-12-18 12:01:53 +01:00
Jorge Aparicio
44c66a7484 remove spsc / pool / mpmc modules on targets w/o atomic / CAS support
closes #123
2019-12-18 12:01:53 +01:00
bors[bot]
909251de32
Merge #120
120: Allow for manual opt-out of CAS features r=japaric a=jamesmunns

I've been working on a bare metal platform lately that does not have CAS (specifically ARMv4 bare metal), and this is not caught by the CPU detection logic in the build.rs. This PR adds a flag that allows for manual specification to avoid CAS features.

Co-authored-by: James Munns <james.munns@ferrous-systems.com>
2019-12-18 10:52:17 +00:00
James Munns
434b7b5e9c Fix bad merge 2019-12-17 18:08:09 +01:00
James Munns
d5789b73ad Merge remote-tracking branch 'origin/master' into manual-cas-disable 2019-12-17 17:05:03 +01:00
James Munns
cbc1c5d781 Change feature gating 2019-12-17 17:01:09 +01:00
bors[bot]
fe1e56c1e9
Merge #133
133: port compile fail tests to trybuild r=japaric a=japaric

closes #127

Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-12-17 15:37:24 +00:00
Jorge Aparicio
1184bf43bc update UI text 2019-12-17 16:36:39 +01:00
Jorge Aparicio
2274a56f02 move cfail tests into their own Cargo project 2019-12-17 16:25:41 +01:00
Jorge Aparicio
e5892d1c90 dev dependencies are x86 only 2019-12-17 16:12:50 +01:00
Jorge Aparicio
a0b7209547 update compile-error text to match 1.37.0 2019-12-17 16:11:13 +01:00
James Munns
410bc9c77e Invert feature flag logic 2019-12-17 15:00:51 +01:00
Jorge Aparicio
2416323c40 remove stray mod cfail 2019-12-17 14:35:03 +01:00
Jorge Aparicio
906b0679ca port compile fail tests to trybuild
closes #127
2019-12-17 14:11:09 +01:00
bors[bot]
5e42f0de54
Merge #126
126: Add DoubleEndedIterator to queue iterators r=japaric a=david-sawatzke

The implementation is pretty straightforward and it's useful

Co-authored-by: David Sawatzke <david-sawatzke@users.noreply.github.com>
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-12-17 11:48:19 +00:00
Jorge Aparicio
6658509412
Merge branch 'master' into master 2019-12-17 11:47:30 +00:00
Jorge Aparicio
57277455a5
test DoubleEndedIterator a bit more 2019-12-17 11:44:36 +00:00
bors[bot]
06431e7397
Merge #125
125: Deserialize maps as maps r=japaric a=dflemstr

The maps are already being serialized as maps, and serde_json will detect
that despite us claiming that maps are seqs, it falls back to parsing them
as maps; however, serde-json-core does not have that fallback logic, so it
makes more sense to give the correct hint here (especially when this is
merged: https://github.com/japaric/serde-json-core/pull/23)

Co-authored-by: David Flemström <david.flemstrom@gmail.com>
2019-12-17 11:29:41 +00:00
bors[bot]
c4db58c8cb
Merge #132
132: PR #121 plus regression test r=japaric a=japaric



Co-authored-by: konstantin <konstantin.kuznecov@gmx.de>
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2019-12-17 10:48:19 +00:00
Jorge Aparicio
90c90ec418 add test to PR #121 2019-12-17 11:46:46 +01:00
konstantin
baa5e620d4 bugfix in mpmc.dequeue 2019-12-17 11:46:46 +01:00
bors[bot]
5e2054286a
Merge #129
129: Fix improper handling of overflow in `len_usize` (fix #128) r=japaric a=david-sawatzke

This will lead to implausibly large lengths, nearly endless iterators
and possibly unsound behaviour through the Drop implementation

Switches the `truncate` method to refer to the common defintion of
simply chopping of the test bits. (Implemented by `as`, which is defined
to do this).

Adds a new `saturate` method to replace the previous `truncate` method

Co-authored-by: David Sawatzke <david-sawatzke@users.noreply.github.com>
2019-12-17 10:44:06 +00:00
bors[bot]
a6949b5439
Merge #131
131: remove unnecessary parentheses r=japaric a=harrysarson

This commit handles a new rustc warning currently in nightly.

I think this is why #129 failed. 🙂 

Co-authored-by: Harry Sarson <harry.sarson@hotmail.co.uk>
2019-12-17 10:40:23 +00:00
Harry Sarson
17180a1a55
remove unnecessary parentheses
This commit handles a new rustc warning currently in nightly
2019-12-16 11:43:26 +00:00
David Sawatzke
fedcf84cb4 Fix improper handling of overflow in len_usize (fix #128)
This will lead to implausibly large lengths, nearly endless iterators
and possibly unsound behaviour through the Drop implementation

Switches the `truncate` method to refer to the common defintion of
simply chopping of the test bits. (Implemented by `as`, which is defined
to do this).

Adds a new `saturate` method to replace the previous `truncate` method
2019-11-29 10:56:10 +01:00
David Sawatzke
621c1d2f98 Add DoubleEndedIterator to queue iterators 2019-11-27 21:51:39 +01:00
David Flemström
c8ef15f23f Deserialize maps as maps
The maps are already being serialized as maps, and serde_json will detect
that despite us claiming that maps are seqs, it falls back to parsing them
as maps; however, serde-json-core does not have that fallback logic, so it
makes more sense to give the correct hint here (especially when this is
merged: https://github.com/japaric/serde-json-core/pull/23)
2019-11-18 22:23:07 +01:00