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
bluss
182097035d
TEST: Update benches for const gen
2021-03-23 18:25:56 +01:00
bluss
d273861cde
DOC: Update MSRV doc to Rust 1.51
2021-03-23 18:22:12 +01:00
bluss
c751c2204f
Remove old Array and Index traits
2021-03-23 18:22:12 +01:00
bluss
f2e9378fd6
FIX: Fix unstable-const-fn feature
2021-03-23 18:22:12 +01:00
bluss
6daae9ae68
FIX: Fix serde feature for const gen
2021-03-23 18:22:12 +01:00
bluss
c9b095f263
FEAT: Port ArrayString to const generics
2021-03-23 18:22:12 +01:00
bluss
fc9c4068f5
MAINT: Update ci for const gen
2021-03-23 18:22:12 +01:00
bluss
18877f243a
TEST: Fix size assertion test for const gen
...
With const generics we can't avoid the usize (or other type) length
field.
2021-03-23 18:08:13 +01:00
bluss
5502324b6f
TEST: Fix arrayvec tests for const gen
...
Just search/replace for syntax [T; N] -> T, N and it works.
2021-03-23 18:08:07 +01:00
bluss
02ab4dc796
FEAT: Add new const generics version of ArrayVec (first draft)
2021-03-23 18:08:07 +01:00
bluss
630b81b848
Use ArrayVecImpl in ArrayVec
2021-03-23 17:51:10 +01:00
bluss
a2b2efd379
Add ArrayvecImpl, base implementation of ArrayVec
2021-03-23 17:51:10 +01:00
bluss
b5efc03a1d
TEST: Build docs for the current crate only in ci
2021-02-22 19:52:07 +01:00
bluss
83bf216712
Merge pull request #171 from bluss/refactor-arrayvec
...
Move ArrayVec implementation to module
2020-12-17 23:10:47 +01:00
bluss
c3ef5fe840
MAINT: Move ArrayVec implementation to module
2020-12-17 22:58:27 +01:00
bluss
5ef684920d
MAINT: Fix doc link in crate
2020-12-17 22:56:23 +01:00
bluss
97c0e7420b
Merge pull request #170 from c410-f3r/patch-1
...
Impl TryFrom<fmt::Arguments<'a>> for ArrayString
2020-12-10 18:35:23 +01:00
Caio
cca663f806
Add test
2020-12-10 13:54:10 -03:00
Caio
6dccb480f7
Impl TryFrom<fmt::Arguments<'a>> for ArrayString
...
Shortcut for
```
use fmt::Write;
let mut v = Self::new();
v.write_fmt(f).map_err(|e| CapacityError::new(e))?;
```
2020-12-09 20:21:03 -03:00
bluss
22f640be56
MAINT: Update ci status link in readme
2020-12-08 21:25:10 +01:00
bluss
a7b9afaf72
Merge pull request #169 from bluss/gh-actions
...
Change from travis to github actions
2020-12-08 21:24:00 +01:00
bluss
32623b8209
MAINT: Change from travis to github actions
2020-12-08 21:20:18 +01:00
bluss
d5e9acdc00
Merge branch 'master' of https://github.com/bluss/arrayvec
2020-12-08 20:31:42 +01:00
bluss
0acbba4ceb
Merge pull request #165 from c410-f3r/try
...
impl TryFrom<&'a str> for ArrayString
2020-12-01 02:22:36 +01:00
bluss
d336f8c5c5
0.5.2
2020-10-23 18:31:24 +02:00
bluss
50c9ed1abd
Merge pull request #166 from hbina/use_add_instead_of_offset
...
Use `add` instead of `offset` so we don't need to cast to isize.
2020-10-23 18:13:41 +02:00
Hanif Bin Ariffin
92867bb118
Use add instead of offset to avoid casting to isize.
2020-10-21 20:50:00 +08:00
bluss
fdeed2d09d
Merge pull request #161 from fusion-engineering-forks/const-new
...
Add unstable-const-fn feature to make new() functions const.
2020-10-21 13:11:45 +02:00
Caio
2267276dbb
impl TryFrom<&'a str> for ArrayString
2020-08-28 08:16:20 -03:00
Mara Bos
fe70c23e94
Add unstable-const-fn feature to make new() functions const.
2020-06-30 20:56:00 +02:00
bluss
4043c58de7
Merge pull request #159 from paulkernfeld/try-from-slice
...
Implement TryFrom<Slice> for ArrayVec
2020-05-12 21:11:13 +02:00
Paul Kernfeld
675e992741
allow items that implement Clone
2020-05-12 14:57:38 -04:00
Paul Kernfeld
488efd0b3e
impl<A: Array> TryFrom<&[A::Item]> for ArrayVec<A>
...
For issue #106
2020-05-12 12:04:09 -04:00