bincode/src
Sean Cross d7edfaa0b7 Fix riscv32 atomics and fix tests on 32-bit platforms (#533)
* tests: fix alloc range test on 32-bit Windows

This test checks the range, which is necessarily different when running
on another platform.

Signed-off-by: Sean Cross <sean@xobs.io>

* enc: case usize/isize as u64/i64 in serialization

The deserialization process assumes that usize/isize are 64-bits, as
does the spec at
https://github.com/bincode-org/bincode/blob/trunk/docs/spec.md#varintencoding

Force `usize` and `isize` to be encoded as `u64` and `i64` to force
32-bit platforms to conform to this spec.

This fixes running tests under `cargo test --target i686-pc-windows-msvc`

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: only provide Atomic*64 on supported platforms

Not all platforms support AtomicI64 or AtomicU64. Use the
`target_has_atomic` config flag to determine whether to include these.

This fixes #532.

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: remove feature and use new attributes

Now that there is an attribute to indicate which atomic features are
supported on this platform, remove the `atomic` Feature and use these
new attributes.

Signed-off-by: Sean Cross <sean@xobs.io>

* alloc: run `cargo fmt`

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-08 11:35:13 +02:00
..
de Added `std::error::Error::source` (#530) 2022-04-04 13:58:18 +02:00
enc Added cross platform tests workflow (#534) 2022-04-04 14:09:42 +02:00
features Fix riscv32 atomics and fix tests on 32-bit platforms (#533) 2022-04-08 11:35:13 +02:00
varint Added `additional` to the `UnexpectedEnd` decode error (#522) 2022-03-17 11:40:10 +01:00
atomic.rs Fix riscv32 atomics and fix tests on 32-bit platforms (#533) 2022-04-08 11:35:13 +02:00
config.rs Made config::standard() implement .write_fixed_array_header() by default (#509) 2022-02-28 17:26:46 +01:00
error.rs Added `std::error::Error::source` (#530) 2022-04-04 13:58:18 +02:00
lib.rs Fix riscv32 atomics and fix tests on 32-bit platforms (#533) 2022-04-08 11:35:13 +02:00
utils.rs Joined the 2 Sealed traits into a single one 2021-10-21 14:27:03 +02:00