530 Commits

Author SHA1 Message Date
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
bluss 04a3559eea FIX: travis link in readme 2020-04-11 18:25:34 +02:00
bluss 491e2ae621 Merge pull request #152 from Luro02/readme
add readme.md and move changelog to a separate file
2020-04-11 18:20:31 +02:00
bluss a3adad7db7 Rename readme.md to README.md 2020-04-11 18:20:09 +02:00
bluss 21b591f939 Rename changelog.md to CHANGELOG.md 2020-04-11 18:19:41 +02:00
bluss 902114f62f Merge pull request #157 from AnderEnder/remove-deprecated-error-description
Remove deprecated Error::description
2020-03-15 21:27:36 +01:00
bluss c61da29426 Merge pull request #156 from RalfJung/miri
enable another unwinding test in Miri
2020-03-15 21:26:04 +01:00
Andrii Radyk 2755d4acb3 remove deprecated Error::description 2020-01-04 00:50:35 +01:00
Ralf Jung b7fd8d6a22 enable another unwinding test in Miri 2019-12-07 12:13:31 +01:00
bluss 4f0faaf027 Merge pull request #155 from RalfJung/miri
Miri now supports catching panics
2019-12-06 11:54:48 +01:00
Ralf Jung 7ae9e2cd1f Miri now supports catching panics 2019-12-06 09:43:14 +01:00
Luro02 3b893b7f6e add readme.md and move changelog to a separate file 2019-11-24 11:50:21 +01:00
bluss badc118d6a Merge pull request #143 from nicbn/is_empty
Add is_empty method for ArrayVec and ArrayString
2019-11-20 18:59:17 +01:00
bluss 481c8ab683 Merge pull request #144 from RalfJung/miri
fix drain_range in Miri and add Miri to CI
2019-11-20 18:57:16 +01:00
bluss 3095e0e4e3 Merge pull request #146 from Phlosioneer/patch-1
Fix outdated comment
2019-11-20 18:56:09 +01:00
Phlosioneer 33d5d2ed96 Fix outdated comment
Comment referenced NoDrop which is no longer used.
2019-11-20 02:03:05 -05:00
Ralf Jung 9ed6941a51 run miri on CI 2019-11-16 09:52:18 +01:00
Ralf Jung 9beb753473 fix aliasing in drain_range 2019-11-16 09:52:18 +01:00
nicbn 633c863b0a Add is_empty method for ArrayVec and ArrayString 2019-11-14 18:58:22 -03:00
bluss fc6664c540 DOC: Fix typo in README 2019-10-09 16:43:40 +02:00
bluss 6905bdbb8a 0.5.1 2019-10-09 16:40:12 +02:00
bluss 618d027f71 Merge pull request #138 from bluss/array-string
Fix ArrayString encode_utf8 to use raw pointers
2019-10-09 12:42:14 +02:00
bluss 090a5c50cb FIX: Support uninitalized data in encode_utf8, and update try_push
We were using &mut [u8] in encode_utf8, but this is not right according
to the developing unsafe coding guidelines. We need to use raw pointers
to write to possibly uninit memory.

We use a raw pointer form for encode_utf8. It was first attempted to
encapsulate the trusted-to-be-valid raw pointer in a simple { *mut u8,
usize } struct, but the current way of passing ptr and len separately
was the only way to not regress performance.

This impl maintains the same performance in arraystring benches.

Add exhaustive-style tests for encode_utf8
2019-10-09 12:23:44 +02:00