Commit Graph

204 Commits

Author SHA1 Message Date
Lokathor 87bf22c173 update changelog 2020-10-12 00:33:54 -06:00
SlightlyOutOfPhase 59a2b4c903 Implement [value; N] syntax support for array_vec! (#118)
* Implement `[value; N]` syntax for `array_vec!`

Also implement the `($array_type:ty)` form by just calling `default()` immediately, which makes more sense.

* Add tests for `[value; N]` macro form

* Implement `[value; N]` syntax for `tiny_vec!`

Also make the same improvement to the `($array_type:ty)` macro variant that I did for `array_vec!`.

* Add tests for `[value; N]` macro form
2020-10-11 18:42:51 -06:00
Lokathor bc9b76badc Create CHANGELOG.md (#121)
* Create CHANGELOG.md

* Update CHANGELOG.md
2020-10-11 18:42:23 -06:00
Lokathor 4730cbc0a1 add license files (#120)
* Create LICENSE-APACHE.md

* Create LICENSE-MIT.md

* Update LICENSE-MIT.md
2020-10-11 18:42:11 -06:00
Lokathor 59228ec799 (cargo-release) start next development iteration 1.0.2-alpha.0 2020-09-08 15:13:39 -06:00
Lokathor 17e7010206 (cargo-release) version 1.0.1 2020-09-08 15:13:26 -06:00
Thom Chiovoloni 9be36eebed Mirror the features used on docs.rs on the playground (#116) 2020-09-05 12:51:15 -06:00
Lokathor cd177990c1 (cargo-release) start next development iteration 1.0.1-alpha.0 2020-08-27 21:25:36 -06:00
Lokathor 69fb75cd0b (cargo-release) version 1.0.0 2020-08-27 21:25:16 -06:00
Lokathor 55bbd1cb72 (cargo-release) version 1.0.0-alpha.4 2020-08-21 15:32:29 -06:00
Nemo157 3a159bc644 Fix building docs on docs.rs (#114)
* Don't enable nightly features when documenting on docs.rs

* Mark serde impls with doc(cfg)
2020-08-21 15:25:39 -06:00
Lokathor 7bdf6a1184 Update rustfmt.toml 2020-08-18 23:53:29 -06:00
Nemo157 0b7377b5e3 Replace A: Default bounds by a constructor on Array (#112)
* Add Array::default function to construct a default array

* Use Array::default instead of Default::default to allow supporting all array sizes

* Missed impl Array for [T; 33] 🍀

* Avoid needing `[T; N]: Default with const-generics
2020-08-17 10:55:51 -06:00
Nemo157 4f0f449248 Run CI on PRs too (#113) 2020-08-17 10:14:09 -06:00
Lokathor f988ca14ac (cargo-release) version 1.0.0-alpha.3 2020-08-17 07:40:24 -06:00
aspen 1dbf6bfe73 Add Serde support (#110)
* Add Serde support.

* Removes `serde/alloc` from deps( tests still pass without it anyways)

* Fix some issues that could result in a panic.

* Wait, actually use the size_hint properly.

* Error instead of silent truncation.

* That wasn't meant to be a default feature.
2020-08-17 07:39:29 -06:00
Caio c9d373ceaf Use min_const_generics (#108) 2020-08-13 09:53:22 -06:00
Lokathor a17c4a8057 (cargo-release) version 1.0.0-alpha.2 2020-08-09 12:15:56 -06:00
Lokathor d344423c54 correct docs.rs error. 2020-08-09 12:15:50 -06:00
Lokathor d725067cb1 improve description / keywords. 2020-08-09 11:22:05 -06:00
Lokathor 09690a0b3a (cargo-release) version 1.0.0-alpha.1 2020-08-09 11:12:31 -06:00
Soveu f4cc761057 Make code DRYer (#107)
* make code dryer

* arrayset definition caused cargo fmt to fail
2020-08-09 10:52:06 -06:00
Soveu 52b17b84cd SliceVec fuzzer + overflow fix on usize::MAX ranges (#99)
* add slicevec fuzzer

* prevent overflow on range calculation
2020-08-09 10:45:19 -06:00
Lokathor 1196d2ae7c Add doc attributes for docs.rs build (#105)
* add with_capacity method.

* Improve docs.

* .

* name the correct requirements.
2020-08-09 10:30:17 -06:00
Lokathor 3ff291c63b alter docs. (#106) 2020-08-09 10:27:55 -06:00
Lokathor 8a47545150 Cratesio fix (#104)
* add with_capacity method.

* Improve docs.
2020-08-09 09:13:26 -06:00
Lokathor 5d40a3f92c add with_capacity method. (#103) 2020-08-08 19:49:31 -06:00
Lokathor 1f2178925c more fn attributes. 2020-08-08 19:09:18 -06:00
Lokathor 72ac150239 Formally move the arrayset into a backup folder. It will become a separate crate some day. 2020-08-08 19:04:39 -06:00
Lokathor b0f27be4b7 apply some fn attributes. 2020-08-08 19:01:45 -06:00
Lokathor 242580cc20 new rustfmt file. leaving fn_args_layout off for now. 2020-08-08 18:32:31 -06:00
Lokathor 1e6e751fe0 Update README.md 2020-08-06 16:23:18 -06:00
Lokathor 96149a1026 Update rust.yml 2020-08-06 16:20:56 -06:00
Lokathor 4961f95e17 Update rust.yml 2020-08-06 16:16:50 -06:00
Lokathor 673cafed4a Update rust.yml 2020-08-06 16:11:22 -06:00
Lokathor 7540862f63 update CI 2020-08-06 16:08:40 -06:00
Lokathor 6d41ca997d Create rust.yml 2020-08-06 15:56:13 -06:00
Soveu 41abf04f28 Fuzz Fuzz Fuzz (#98)
* more features for fuzzing

* arrayveciter fuzzer + overflow fix

* moar fuzzers and tinyvecdrain change

* cargo fmt

* Self on enums is not stable in 1.36

* 🐞 BUGFIX: ArrayVecIterator::nth_back

* cargo fmt
2020-08-02 14:40:13 -06:00
Lokathor 9372c2052c Update Cargo.toml 2020-07-31 16:05:29 -06:00
Soveu 78eac4ff84 Change len type from usize to u16 (#97)
* change len from usize to u16

* cargo fmt

* change len to tail
2020-07-31 13:46:05 -06:00
Sergey "Shnatsel" Davidoff 24737546d3 Expand fuzzing coverage (#95)
* Also cover reserve, reserve_exact and shrink_to_fit by fuzzing. SmallVec had a use-after-free bug in shrink_to_fit inlining so we'd better test this

* Also test extend_from_slice on tinyvec and arrayvec
2020-07-31 21:04:57 +02:00
Sergey "Shnatsel" Davidoff 12054cc899 Fuzz: drop workarounds for operations that may panic (#92)
Fuzz: drop workarounds for operations that may panic now that rutenspitz compares panic behavior
2020-07-29 15:40:12 +02:00
Jakub Wieczorek 7e57ee3a07 Fix the fuzzers that stopped compiling (#91) 2020-07-28 17:05:11 +02:00
Lokathor f05f953955 (cargo-release) start next development iteration 0.4.2-alpha.0 2020-07-23 19:05:59 -06:00
Lokathor 9bd713f11c (cargo-release) version 0.4.1 2020-07-23 19:05:45 -06:00
Soveu 820dbc4c85 A bit of everything for iterators (#87)
* slight changes functions that use drain

* bug in arrayvec iter

* reverse iter for arrayvec

* nth_back is stable since 1.37

* simpler drain for arrayvec

* soveu forgot to add changed files

* fmt + feature for rustc >= 1.40

* cosmetic changes

* does the ci work now?

* SHNAAAAAAAAATSEEEEEEEEL
2020-07-23 13:28:01 -06:00
Lokathor 81420cd6ed (cargo-release) start next development iteration 0.4.1-alpha.0 2020-07-18 00:27:39 -06:00
Lokathor f1a171df93 (cargo-release) version 0.4.0 2020-07-18 00:27:29 -06:00
Benjamin Scherer 04f65e50cf Add ArrayVec::splice and TinyVec::splice (#85)
* Add ArrayVec::splice and TinyVec::splice

Added for closer API parity with std::Vec

* Fix ArrayVec::splice example typo

* Removed FusedIterator bound from splice

This bound could've caused confusing error messages, and was
inconsistent with the Vec API. splice now uses fuse itself to ensure
consistency. Vec::splice consumes the whole iterator at once, so it
essentially has the same behavior, but this implementation gradually
consumes the iterator as elements are drained, so this fuse is necessary
to keep the behavior the same.

* Reserve additional capacity in TinyVecSplice

Used TinyVec::reserve to pre-allocate space for elements being spliced
into the TinyVec after the splicing iterator is dropped. Used the lower
bound like Vec's splice does.

* Run rustfmt
2020-07-18 00:22:59 -06:00
Soveu af665296b5 "try_*" functions and "to_vec" for arrayvec (#82)
* change behavior on extend_from_slice, append

* preallocation in extend()

* append v2

* obviously

* fix resize_with

* try_functions and to_vec on arrayvec

* shrink_to_fit

* bit of cleaning

* cosmetic changes

* use asserts instead of if-panics

* I promise, this is the last commit

* examples, tests

* matches macro exists since rust 1.42

* Update tinyvec.rs

* new extend and insert

* mem::take is from rust 1.40
2020-07-17 16:07:10 -06:00