Caio
e98cb1c81a
Typo
2021-08-13 20:06:03 -03:00
Caio
f5acafa0b3
Add zero_filled constructor
2021-08-13 20:04:44 -03:00
bluss
e5b3c9bc6c
Merge pull request #189 from clarfonthey/as_mut_str
...
Add ArrayString::as_mut_str
2021-06-20 23:41:01 +02:00
ltdk
c4917813b8
Add ArrayString::as_mut_str
2021-06-20 15:35:54 -04:00
bluss
0c866b32f0
0.7.1
2021-06-05 15:13:37 +02:00
bluss
515a18cc88
Merge pull request #187 from conradludgate/into-inner-take
...
take and into_inner_unchecked functions
2021-05-31 23:43:55 +02:00
Conrad Ludgate
0fdf39f15d
debug-assert
2021-05-30 20:34:17 +01:00
Conrad Ludgate
16c8e4d40d
tests + docs
2021-05-29 13:01:14 +01:00
bluss
dfceb6d624
Merge pull request #186 from a1phyr/use_truncate_in_clone_from
...
Use `truncate` in `clone_from`
2021-05-29 09:03:40 +02:00
Conrad Ludgate
6dc46b3a1c
update take
2021-05-26 20:08:02 +01:00
Conrad Ludgate
8778483b12
feat: API additions
2021-05-25 21:57:59 +01:00
Benoît du Garreau
6be5ed4bc2
Use truncate in clone_from
2021-05-24 22:09:34 +02:00
bluss
7b290b7aa5
DOC: Mention author @oxalica in changelog for retain opt
2021-03-30 23:31:09 +02:00
bluss
bf4ee7e5f9
DOC: Update 0.7.0 changelog with forgotten item #174
2021-03-30 23:17:50 +02:00
bluss
5685049fbe
0.7.0
2021-03-29 22:10:04 +02:00
bluss
b0dfc877c1
Merge pull request #183 from bluss/revert-new
...
Add new_const() for const construction and revert new to old version
2021-03-29 21:57:12 +02:00
bluss
b7f3aa9fce
FIX: Add new_const() for const construction and revert new to old version
...
The new() function is significantly faster, it optimizes better at the
moment/in current rust. For this reason, provide a const fn constructor,
but not as the default `new`.
2021-03-29 21:52:39 +02:00
bluss
6b9faa7785
Merge pull request #174 from niklasf/optimize-retain
...
Mirror optimization of std::Vec::retain (rust-lang/rust#81126 )
2021-03-29 19:37:01 +02:00
bluss
b82a6d4977
FIX: Update .retain() optimization for const generics
2021-03-29 17:43:01 +02:00
Niklas Fiekas
c094906a13
Fix mutable reborrow
...
Co-authored-by: bluss <bluss@users.noreply.github.com >
2021-03-29 17:40:46 +02:00
Niklas Fiekas
345c6b4970
Mirror optimization of std::Vec::retain ( rust-lang/rust#81126 )
2021-03-29 17:40:46 +02:00
bluss
198a403194
0.6.1
2021-03-29 17:36:54 +02:00
bluss
57e140065f
FIX: Minor code style change in the char module
...
Just use the simple inherent pointer methods here.
2021-03-29 17:31:37 +02:00
bluss
0aab340c43
MAINT: Remove unused file custom.css
...
(This is a remainder from pre-docs.rs doc generation.)
2021-03-29 17:31:26 +02:00
bluss
366c5da73a
Merge pull request #181 from rodrimati1992/master
...
Made ArrayVec::new and ArrayString::new const fns
2021-03-29 17:23:48 +02:00
bluss
5303f6911b
MAINT: remove unstable-const-fn testing from ci
2021-03-28 22:51:01 +02:00
bluss
b24baf1b5d
DOC: Tweak formatting and wording of unstable-const-fn feature
2021-03-28 22:47:22 +02:00
rodrimati1992
165414e0d9
Added tests for construction in const context
...
Updated the capacity panic test
2021-03-28 14:49:45 -03:00
rodrimati1992
5ad4687b1b
Made ArrayVec::new and ArrayString::new const fns
...
Added utils module with a `MaybeUninit` helper type to construct `[MaybeUninit<T>; N]`
Removed all uses of the "unstable-const-fn" feature, and documented it as being deprecated.
Changed `assert_capacity_limit` macro to work in const contexts.
2021-03-28 14:48:27 -03:00
bluss
9ac0b2057f
Merge pull request #180 from Xaeroxe/limit
...
Minor fix to macro definition
2021-03-27 14:23:39 +01:00
Jacob Kiesel
0bc7ffc9fd
Minor fix to macro definition
2021-03-26 12:34:16 -06:00
bluss
c318a3ddc0
Merge pull request #179 from bluss/rust-1.51-ci
...
Update CI to use experimental/continue on error only for nigthly features
2021-03-25 18:25:45 +01:00
bluss
2626b5575a
TEST: Update CI to use experimental/continue on error only for nigthly features
2021-03-25 18:20:37 +01:00
bluss
109cc0c5d5
Merge pull request #178 from cuviper/patch-1
...
DOC: Fix typo in ArrayVec::is_full
2021-03-25 17:52:12 +01:00
Josh Stone
dc0360ffd2
DOC: Fix typo in ArrayVec::is_full
2021-03-24 16:57:10 -07:00
bluss
f74f3d2b02
0.6.0
2021-03-24 23:50:45 +01:00
bluss
c2453e5f9f
Merge pull request #177 from bluss/length-32-bit
...
Use u32 for the length field in arrayvec
2021-03-24 18:46:11 +01:00
bluss
feb9928cfc
DOC: Update changelog for length changes
2021-03-24 18:43:09 +01:00
bluss
fd724e0edb
DOC: Minor tweaks to docs
2021-03-24 18:43:09 +01:00
bluss
0c90469b61
FEAT: Use u32 for the length field in arrayvec
...
Store the length as u32 internally. This is to shrink the size of the
ArrayVec value (when possible, depending on element type).
Inline storage vectors larger than u32::MAX are very unlikely to be
useful - for these cases, prefer using Vec instead.
It's not possible to have the CAP type parameter be of type u32 (missing
features in const evaluation/const generics). We also have to panic at
runtime instead of having a static assertion for capacity, for similar
reasons.
2021-03-24 18:43:09 +01:00
bluss
dfd882bbe4
DOC: Language fixes in the changelog
2021-03-23 22:02:21 +01:00
bluss
f9f58c94b7
FIX: Use more efficient cloning in IntoIter::clone
...
Using .extend_from_slice() where possible.
2021-03-23 21:57:11 +01:00
bluss
cf283a0ee6
FIX: Code cleanup in .into_inner()
...
Prefer ManuallyDrop instead of forget (more modern style preference -
with the benefit that the ManuallyDrop style sets up the non-dropping
before taking further actions).
2021-03-23 21:55:54 +01:00
bluss
74039f1b4c
DOC: Doc comment and example updates for ArrayVec
2021-03-23 21:55:43 +01:00
bluss
f9b3338318
DOC: Update changelog for 0.6.0
2021-03-23 21:55:09 +01:00
bluss
666c5ece59
API: Remove deprecated ArrayVec::dispose
2021-03-23 21:43:19 +01:00
bluss
63ecdeb0b8
Merge pull request #175 from bluss/extend-panic-on-capacity-error
...
Panic in .extend() and from_iter on capacity exceeded
2021-03-23 20:36:39 +01:00
bluss
bcffbf938b
MAINT: Delete historical nodrop, nodrop-union directories
...
These crates are deprecated (use ManuallyDrop and/or MaybeUninit
instead).
2021-03-23 19:41:11 +01:00
bluss
a554ea219a
API: Panic in .extend() and from_iter on capacity exceeded
...
This regresses performance of the .extend(s) benchmark where s is a
slice; to compensate add a private extend_from_slice method that we can
use where possible (clone_from, try_from).
2021-03-23 19:33:10 +01:00
bluss
a58e1a5ccc
Merge pull request #172 from bluss/min-const-gen
...
Use const generics in ArrayVec
2021-03-23 19:21:37 +01:00