Commit Graph

57 Commits

Author SHA1 Message Date
bluss 2316b85fbc 0.4.9 2018-12-16 18:02:49 +01:00
bluss 29012231a8 FEAT: Implement a "MaybeUninit" and use it conditionally
Use a build script to detect if we can use MaybeUninit or NoDrop.
Enabling unstable features automatically is not ideal, but since it's
a soundness issue we should do it.

Use a MaybeUninit-like union on nightly when we can. We use a feature
detection script in build.rs, so that we also go back to the fallback if
the unstable feature changes in an unexpected way.

We need to continue to use NoDrop for best working stable
implementation, but we eagerly use our union solution where we can,
currently only in nightlies.

Rustc feature probe code written by Josh Stone (cuviper),
taken from num-bigint.
2018-12-15 15:12:03 +01:00
bluss c8d12cecb3 0.4.8 2018-11-25 09:46:33 +01:00
bluss f1d73f4feb FEAT: Add array sizes 33 to 128 and 129 to 255 under feature flags
This way we cover all users up to 256 at least. The reason these are not
enabled by default is that they slow down the compilation of the crate
by a factor of 2-3x.
2018-11-25 09:22:51 +01:00
bluss 0872a5946c 0.4.7 2018-01-17 20:45:50 +01:00
bluss b3e5b1e1ac 0.4.6 2017-11-04 11:57:17 +01:00
bluss e364e2e79d 0.4.5 2017-10-27 22:54:46 +02:00
bluss 4195f1a741 FEAT: Benchmarks for arraystring.try_push / push
These benches inform encode_utf8 changes, if any.
2017-10-27 22:31:49 +02:00
bluss 456aeaf557 FEAT: Remove odds dependency in arrayvec
Copy the encode_utf8 function from odds. std encode_utf8 requires Rust
1.15 and has a different signature, this one seems to fit us better.
2017-10-27 22:31:49 +02:00
bluss 75abbd6145 0.4.4 2017-10-21 14:01:46 +02:00
bluss 9156256501 0.4.3 2017-10-16 22:39:28 +02:00
bluss 0c7aebe2dd MAINT: Don't depend on odds/std or nodrop/std
We don't have any reason to ask for std in odds (anymore, long after
Rust 1.6 now).
2017-10-16 22:03:55 +02:00
bluss af8b746fc4 FEAT: Add benchmarks for .extend() 2017-10-08 17:31:05 +02:00
bluss 6a7445f2dd 0.4.2 2017-09-24 18:11:01 +02:00
bluss 1a202a904e 0.4.1 2017-09-11 21:15:25 +02:00
bluss f33c4e44dd DOC: Mention serde-1 feature 2017-09-11 19:43:54 +02:00
bluss cea481f494 0.4.0 2017-08-08 21:07:02 +02:00
bluss 2919af394e MAINT: Add crate categories 2017-08-06 18:21:05 +02:00
bluss 707ddc3224 MAINT: Use serde-1 feature in docs.rs 2017-07-30 14:15:34 +02:00
bluss 5dcb5ab2c7 FEAT: Change .insert() and .remove() to match Vec
- Add try_insert / try_remove to be the old fallible variants that
  return errors
- Insert that pushes out if full does no longer exist -- full vec is an
  error
2017-07-30 12:57:28 +02:00
David Ross 1b0168bb6f Change feature name from 'serde' to 'serde-1'. 2017-06-08 12:02:21 -07:00
David Ross 21cd20ff26 Add 'serde' feature for serializing and deserializing ArrayVec and ArrayString.
This implements serde support under the optional 'serde' feature, and adds unit tests to test said support.
https://serde.rs/unit-testing.html used as a guide for the unit tests - using 'serde_test' makes for much
less boilerplate here, but it does require that the project have a non-optional dev dependency on 'serde_test'.
2017-06-08 01:42:34 -07:00
bluss f65ea92da4 Remove the optional generic-array feature
- It can be added back later if needed
- A public dependency implies version coupling, and we can't afford to
  have it for a niche use case.
2017-03-24 18:57:39 +01:00
bluss 738721a28d arrayvec 0.3.21 2017-03-17 18:50:36 +01:00
bluss 3d69403dee Use encode_utf8 from crate odds 2016-10-16 11:54:44 +02:00
bluss d43c959fa8 0.3.20 2016-10-04 14:47:14 +02:00
bluss f331bb1228 0.3.19 2016-09-28 11:13:15 +02:00
bluss 60a97632bc Support generic-array as arrayvec backend 2016-09-28 11:06:20 +02:00
bluss 82ab295554 0.3.18 2016-09-21 14:25:24 +02:00
bluss 8785860ec4 arrayvec 0.3.17 2016-09-08 11:46:01 +02:00
bluss a41ecc0a29 Bump arrayvec to 0.3.16 2016-03-01 00:06:45 +01:00
bluss f9defd2fe0 Bump arrayvec to 0.3.15
Fixes #20
2016-02-06 20:24:24 +01:00
bluss 595db1ffcc Add feature "std" to arrayvec: Allow opting out of libstd 2016-02-06 20:16:43 +01:00
bluss a5f63d3191 Bump to 0.3.14 2016-02-06 01:13:00 +01:00
bluss 6c71597565 Bump to 0.3.13 2016-01-13 13:10:36 +01:00
bluss 1921048acd Bump version 2015-09-20 16:07:54 +02:00
bluss 5a0e53257c Bump version 2015-09-10 19:52:06 +02:00
bluss eaa884087d Bump version 2015-08-21 14:58:24 +02:00
bluss c35760e02c Use NoDrop to fix panic safety issues
ArrayVec::drop was not panic safe — if there would be a panic during an
element's drop, the discriminant would never be set to Dropped, and the
array elements would potentially double drop.

Fix this by going back to the old NoDrop composition. The NoDrop struct
thas its own Drop impl, that will trigger too on panic during an element's
drop. This serves to make ArrayVec::drop panic safe.

Also tweak IntoIter::drop to make it panic safe: set inner ArrayVec's
length before dropping any elements.

Thank you to @Stebalien for reporting this bug and providing the
excellent testcases in this commit.

Using NoDrop expands ArrayVec to have two drop flags again, but this
is a temporary tradeoff, drop flags will eventually go away.

Fixes #3
2015-08-20 22:33:01 +02:00
root b6d4d82808 arrayvec: Bump version 2015-07-30 16:52:55 +02:00
root 9e4bac559c arrayvec: Make nodrop purely a dev-dependency
We generate docs for it, but we don't need it.
2015-07-30 16:51:07 +02:00
root d3728b654e Bump version 2015-07-30 16:16:42 +02:00
root 3634fa4633 Bump version 2015-06-22 16:39:52 +02:00
root 5ae6e1aadc arrayvec: Use odds 0.2 and bump version 2015-06-14 14:53:05 +02:00
root ad22698464 arrayvec: Use odds & bump version 2015-06-02 17:30:59 +02:00
root 07e497a2be arrayvec: Bump version 2015-05-25 13:46:26 +02:00
root 0e00fbccf1 Bump version 2015-05-23 13:04:03 +02:00
root e91a018220 Bump version 2015-05-23 01:07:50 +02:00
root d8d21dc14c Bump version 2015-05-22 20:22:50 +02:00
root a268a5e25c Bump arrayvec version 2015-05-22 14:28:03 +02:00