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>
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>
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>
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>
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
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)
117: Added peek_mut for the binary heap r=japaric a=korken89
As discussed in https://github.com/japaric/heapless/issues/109, please have a look and lets bike-shed the API.
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
100: Remove unecessary conditional r=japaric a=jamesmunns
In both cases, head is subtracted from tail, wrapping when necessary.
Co-authored-by: James Munns <james@onevariable.com>
104: Enable MSRV 1.36 for travis-ci r=japaric a=XOSplicer
This PR enables CI runs for Rust 1.36 and current stable for on Ci branches for bors.
Co-authored-by: Felix Stegmaier <stegmaier.felix@gmail.com>
101: Fix boxed Error in build.rs for nightly r=japaric a=XOSplicer
on nightly (rustc 1.37.0-nightly (7840a0b75 2019-05-31)) the build is currently broken (see below).
Adding `dyn Error` as the error result in `build.rs` solves the problem.
```
$ cargo +nightly build
Compiling typenum v1.10.0
Compiling stable_deref_trait v1.1.1
Compiling byteorder v1.2.7
Compiling heapless v0.5.0-alpha.2 (/home/felix/workspace/rust/heapless)
error: trait objects without an explicit `dyn` are deprecated
--> build.rs:5:29
|
5 | fn main() -> Result<(), Box<Error>> {
| ^^^^^ help: use `dyn`: `dyn Error`
|
note: lint level defined here
--> build.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(bare_trait_objects)] implied by #[deny(warnings)]
error: aborting due to previous error
error: Could not compile `heapless`.
warning: build failed, waiting for other jobs to finish...
error: build failed
```
Co-authored-by: Felix Stegmaier <stegmaier.felix@gmail.com>
97: Turn `binary_heap::Kind` into a sealed trait r=japaric a=XOSplicer
resolves#72
breaking change, since a previously public trait is now private
Co-authored-by: Felix Stegmaier <stegmaier.felix@gmail.com>
92: use core::mem::MaybeUninit; drop min-const-fn and smaller-atomics features r=japaric a=japaric
closes#69
this contains breaking changes (see CHANGELOG) and bumps the crate version to 0.5.0. We'll make a pre-release (i.e. v0.5.0-alpha.1) after rust-lang/rust#60445 lands and a proper release when that PR makes into the stable channel.
Co-authored-by: Jorge Aparicio <jorge@japaric.io>