commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
b2b3e0c7eb38ff288d32726594d32a90d0e684fc
Lokathor
2021-01-26T01:27:05
(cargo-release) version 1.1.1
diff --git a/Cargo.toml b/Cargo.toml index 1cd3d70..7d208f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.1.1-alpha.0" +version = "1.1.1" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
9dca7ce1a31dba92e6a9c832863741763ab29fe8
Ben Kimock
2021-01-18T23:03:40
swap instead of rotate_right, explain in comment (#129)
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 943eae4..26f21d4 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -480,7 +480,9 @@ impl<A: Array> ArrayVec<A> { /// assert_eq!(av.try_insert(4, "five"), Some("five")); /// ``` #[inline] - pub fn try_insert(&mut self, index: usize, item: A::Item) -> Opt...
1
26
4
db5465a108864befd755b23a9396c628c3b372eb
Ben Kimock
2021-01-18T22:19:28
optimize From<&[T]> (#132)
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 86a7cc2..94beca5 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -1118,8 +1118,15 @@ where TinyVec::Heap(slice.into()) } else { let mut arr = ArrayVec::new(); - arr.extend_from_slice(slice); - + // We do not use ArrayVec::extend_from_sl...
1
9
2
1624ff22e3c97d92d6f7c465cdd2a1c8fe20c9cb
Ben Kimock
2021-01-18T22:17:52
optimize ArrayVec::fill (#131)
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index bffd35e..943eae4 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -403,10 +403,19 @@ impl<A: Array> ArrayVec<A> { pub fn fill<I: IntoIterator<Item = A::Item>>( &mut self, iter: I, ) -> I::IntoIter { + // If this is written as a call to push for eac...
1
11
2
2d45d6e7aaa1120bfeed83cea0c0e25deec0e7a6
Ben Kimock
2021-01-14T02:40:55
Swap each element instead of calling rotate_left (#128)
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 80b4356..bffd35e 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -601,7 +601,9 @@ impl<A: Array> ArrayVec<A> { pub fn remove(&mut self, index: usize) -> A::Item { let targets: &mut [A::Item] = &mut self.deref_mut()[index..]; let item = take(&mut ta...
1
3
1
7bb8a78f94c97f143aa912bd681a084168af9549
Ben Kimock
2021-01-14T00:51:07
Outline the drain to heap logic in TinyVec::push (#127) * Outline the drain to heap logic in TinyVec::push * Use #[cold] and explain the outlining in a comment
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index aa8945d..86a7cc2 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -676,18 +676,34 @@ impl<A: Array> TinyVec<A> { /// tv.push(4); /// assert_eq!(tv.as_slice(), &[1, 2, 3, 4]); /// ``` - #[inline(always)] + #[inline] pub fn push(&mut self, val: A::Item) ...
1
25
9
faa03b21335021531ce93a012a8f62753d34ef64
Lokathor
2020-11-20T00:00:29
(cargo-release) start next development iteration 1.1.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 3bb11ad..1cd3d70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.1.0" +version = "1.1.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
967ca418c00d0fab0be6baab55a639af69519697
Lokathor
2020-11-19T23:59:58
(cargo-release) version 1.1.0
diff --git a/Cargo.toml b/Cargo.toml index c73b2cd..3bb11ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.1.0-alpha.1" +version = "1.1.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
29a97b764a9bfdfbd0baf90fa6ecec8bb8559a8a
Lokathor
2020-10-14T19:11:32
additional doc attributes.
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index fc2296d..aa8945d 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -859,6 +859,7 @@ impl<A: Array> TinyVec<A> { /// Draining iterator for `TinyVecDrain` /// /// See [`TinyVecDrain::drain`](TinyVecDrain::<A>::drain) +#[cfg_attr(docs_rs, doc(cfg(feature = "alloc")))...
1
4
0
74b902cd9d90ad636858632769ae1971b5b7f560
Lokathor
2020-10-14T18:48:35
(cargo-release) version 1.1.0-alpha.1
diff --git a/Cargo.toml b/Cargo.toml index a45a8ab..c73b2cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.1.0-alpha.0" +version = "1.1.0-alpha.1" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
0ecfb47c06454bf1e4e774104fa1c8b6c4122e23
Lokathor
2020-10-14T18:46:24
version bump
diff --git a/Cargo.toml b/Cargo.toml index 2c5bd4e..a45a8ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.2-alpha.0" +version = "1.1.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
feecd9ae837d8b98227a7645b5be890c7266d23f
Lokathor
2020-10-13T18:17:16
make docs even more plain and simple.
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 03bb575..80b4356 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -318,10 +318,10 @@ impl<A: Array> ArrayVec<A> { ArrayVecDrain::new(self, range) } - /// Returns the inner backing storage of the `ArrayVec`. If this `ArrayVec` is - /// full, every ele...
1
7
35
0529972454fb783884e25fce4ddc74c79db3c686
SlightlyOutOfPhase
2020-10-12T00:42:51
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!` ...
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 43db194..4a3c1bf 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -36,11 +36,14 @@ macro_rules! array_vec { } }; ($array_type:ty) => { - $crate::array_vec!($array_type =>) + $crate::ArrayVec::<$array_type>::default() }; ($($elem:expr),*) =...
4
38
2
8cdea6ed707bf7751a3b12fb88b854a96149849e
Lokathor
2020-09-08T21:13:39
(cargo-release) start next development iteration 1.0.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 5fdde8a..2c5bd4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.1" +version = "1.0.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
e10b837d7c131219d80851f61145661d69d129bf
Lokathor
2020-09-08T21:13:26
(cargo-release) version 1.0.1
diff --git a/Cargo.toml b/Cargo.toml index 12951c4..5fdde8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.1-alpha.0" +version = "1.0.1" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
75e7090cc0384f527c2387947f3ccd34e960d45e
Thom Chiovoloni
2020-09-05T18:51:15
Mirror the features used on docs.rs on the playground (#116)
diff --git a/Cargo.toml b/Cargo.toml index 147b7bd..12951c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,9 @@ experimental_write_impl = [] features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] rustdoc-args = ["--cfg","docs_rs"] +[package.metadata.playground] +features = ["alloc", "grab_spare_slic...
1
3
0
aa4860e0092cb61449be65d96c5490e81373369f
Lokathor
2020-08-28T03:25:36
(cargo-release) start next development iteration 1.0.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index ab1ce92..147b7bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.0" +version = "1.0.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
4257754d9147785d230ae146dc0e6b90bbd94448
Lokathor
2020-08-28T03:25:16
(cargo-release) version 1.0.0
diff --git a/Cargo.toml b/Cargo.toml index 912f096..ab1ce92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.0-alpha.4" +version = "1.0.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
4cf02c74b7f6ff7c2efe65a89ed9439dfb38549c
Lokathor
2020-08-21T21:32:29
(cargo-release) version 1.0.0-alpha.4
diff --git a/Cargo.toml b/Cargo.toml index 99dd035..912f096 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.0-alpha.3" +version = "1.0.0-alpha.4" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
ea8efbc87050c4ca6fe2a4ad3beeba3836418f03
Nemo157
2020-08-21T21:25:39
Fix building docs on docs.rs (#114) * Don't enable nightly features when documenting on docs.rs * Mark serde impls with doc(cfg)
diff --git a/Cargo.toml b/Cargo.toml index bcb1e77..99dd035 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ nightly_const_generics = [] experimental_write_impl = [] [package.metadata.docs.rs] -all-features = true +features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] rustdoc-args = ["--cfg","d...
3
5
1
8564f269640c8493919080bb32e33b6edd7535a3
Lokathor
2020-08-17T13:40:24
(cargo-release) version 1.0.0-alpha.3
diff --git a/Cargo.toml b/Cargo.toml index 6cc21ff..bcb1e77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
686f424212e795a805ecfd82ce1246d93a7d671c
aspen
2020-08-17T13:39:29
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.
diff --git a/Cargo.toml b/Cargo.toml index 14f048d..6cc21ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,8 @@ repository = "https://github.com/Lokathor/tinyvec" [dependencies] tinyvec_macros = { version = "0.1", optional = true } +# Provides `Serialize` and `Deserialize` implementations +serde = { version ...
6
237
0
e1f3dc9c994a12f8e5dd823a191f59fd173bd9c7
Caio
2020-08-13T15:53:22
Use min_const_generics (#108)
diff --git a/src/lib.rs b/src/lib.rs index 8b2b3dc..6d0f495 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,8 +4,7 @@ feature = "nightly_slice_partition_dedup", feature(slice_partition_dedup) )] -#![cfg_attr(feature = "nightly_const_generics", allow(incomplete_features))] -#![cfg_attr(feature = "nightly_const_gen...
1
1
2
b1542972b979822902e65b9e41c872707d9d12ef
Lokathor
2020-08-09T18:15:56
(cargo-release) version 1.0.0-alpha.2
diff --git a/Cargo.toml b/Cargo.toml index ee0ca3c..14f048d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.0.0-alpha.1" +version = "1.0.0-alpha.2" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
f84256f12797a23b6261868db0b48bb2da9aa50b
Lokathor
2020-08-09T18:15:50
correct docs.rs error.
diff --git a/src/lib.rs b/src/lib.rs index b51b4f6..8b2b3dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ )] #![cfg_attr(feature = "nightly_const_generics", allow(incomplete_features))] #![cfg_attr(feature = "nightly_const_generics", feature(const_generics))] +#![cfg_attr(docs_rs, feature(doc_cfg))] #![w...
1
1
0
d057f4c5b2c0afc47221b7a90e86fbb7ac7cbc4d
Lokathor
2020-08-09T17:22:05
improve description / keywords.
diff --git a/Cargo.toml b/Cargo.toml index be2a2f7..ee0ca3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "tinyvec" -description = "Just, really the littlest Vec you could need. So smol." +description = "`tinyvec` provides 100% safe vec-like data structures." version = "1.0.0-alpha.1" ...
1
2
2
4d9085ee87815f72983c352457cc1e8a0e6b6a7d
Lokathor
2020-08-09T17:12:31
(cargo-release) version 1.0.0-alpha.1
diff --git a/Cargo.toml b/Cargo.toml index 026f4a9..be2a2f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "1.0.0-alpha.0" +version = "1.0.0-alpha.1" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
f17209f3c20814bf2245d66f4ad12ef8285f98a6
Soveu
2020-08-09T16:52:06
Make code DRYer (#107) * make code dryer * arrayset definition caused cargo fmt to fail
diff --git a/Cargo.toml b/Cargo.toml index fcc6171..026f4a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,13 @@ categories = ["data-structures", "no-std"] repository = "https://github.com/Lokathor/tinyvec" [dependencies] -# not even std! +tinyvec_macros = { version = "0.1", optional = true } [features] ...
3
162
237
ed749ef26001bac182d5f373909ba01e97500915
Soveu
2020-08-09T16:45:19
SliceVec fuzzer + overflow fix on usize::MAX ranges (#99) * add slicevec fuzzer * prevent overflow on range calculation
diff --git a/fuzz/src/bin/slicevec.rs b/fuzz/src/bin/slicevec.rs new file mode 100644 index 0000000..628a3b8 --- /dev/null +++ b/fuzz/src/bin/slicevec.rs @@ -0,0 +1,123 @@ +use honggfuzz::fuzz; +use rutenspitz::arbitrary_stateful_operations; +use std::{fmt::Debug, iter::FromIterator, ops::RangeBounds}; + +use tinyvec::...
5
131
8
d3f66a20c509965a138c95bfadada28147da335c
Lokathor
2020-08-09T16:30:17
Add doc attributes for docs.rs build (#105) * add with_capacity method. * Improve docs. * . * name the correct requirements.
diff --git a/Cargo.toml b/Cargo.toml index 9125f23..fcc6171 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,7 @@ experimental_write_impl = [] [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg","docs_rs"] [profile.test] opt-level = 3 diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 4...
2
3
0
1d2a3d164ba1a283742d46111ab93672f3f8fcca
Lokathor
2020-08-09T16:27:55
alter docs. (#106)
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 286b79d..49c3786 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -434,6 +434,11 @@ impl<A: Array> TinyVec<A> { /// Creates a draining iterator that removes the specified range in the vector /// and yields the removed items. /// + /// **Note: This method h...
1
5
0
2fd9f55886596fb520ee01e93ce31d5367052fbb
Lokathor
2020-08-09T01:49:31
add with_capacity method. (#103)
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 1a7d8b6..286b79d 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -256,7 +256,7 @@ impl<A: Array> TinyVec<A> { /// ```text /// Note that the allocator may give the collection more space than it requests. /// Therefore, capacity can not be relied upon to be ...
1
28
1
533db2800333d1f5830b18a9e620a3b82a264ee3
Lokathor
2020-08-09T01:09:18
more fn attributes.
diff --git a/src/slicevec.rs b/src/slicevec.rs index 7a22ee6..facee32 100644 --- a/src/slicevec.rs +++ b/src/slicevec.rs @@ -19,6 +19,8 @@ pub struct SliceVec<'s, T> { } impl<'s, T> Default for SliceVec<'s, T> { + #[inline(always)] + #[must_use] fn default() -> Self { Self { data: &mut [], len: 0 } }
1
2
0
b5c4a514277076450b85d45364107aa72b44399f
Lokathor
2020-08-09T01:04:39
Formally move the arrayset into a backup folder. It will become a separate crate some day.
diff --git a/Cargo.toml b/Cargo.toml index e078d4c..9125f23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,11 +41,6 @@ nightly_const_generics = [] # an experimental impl only for now. experimental_write_impl = [] -# EXPERIMENTAL: Not part of SemVer. This adds an "ArraySet" type which is -# an array backed set type...
2
0
5
5b052e0139258db52d569dbe911459659c4e3b2b
Lokathor
2020-08-09T01:01:45
apply some fn attributes.
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 779afe8..55db2b0 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -942,6 +942,7 @@ impl<'p, A: Array, I: Iterator<Item = A::Item>> Iterator { type Item = A::Item; + #[inline] fn next(&mut self) -> Option<A::Item> { if self.removal_start < self.rem...
2
20
3
4f976c9b45c43378780f547b654e2fe5c5e916f3
Soveu
2020-08-02T20:40:13
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
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index b38aab3..4b8aa6d 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -6,8 +6,11 @@ edition = "2018" publish = false [dependencies] -tinyvec = { path = "..", features = ["alloc", "nightly_slice_partition_dedup"] } rutenspitz = "0.2.1" honggfuzz = "0.5.45" arb...
8
315
63
50e93b5f44e54d3c870d9b34103ff5ab69a67e11
Lokathor
2020-07-31T22:05:29
Update Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index a8a9d22..2dac02b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.2-alpha.0" +version = "1.0.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
f2ec57851f41a77c88ec7bb35a6a60c529e14ab4
Soveu
2020-07-31T19:46:05
Change len type from usize to u16 (#97) * change len from usize to u16 * cargo fmt * change len to tail
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index d5de521..a71523a 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -1,4 +1,5 @@ use super::*; +use core::convert::TryInto; /// Helper to make an `ArrayVec`. /// @@ -91,7 +92,7 @@ macro_rules! array_vec { #[repr(C)] #[derive(Clone, Copy, Default)] pub stru...
2
77
51
18af1a3959f43e2a51fd46093658cfe8bc662339
Sergey "Shnatsel" Davidoff
2020-07-31T19:04:57
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
diff --git a/fuzz/src/bin/arrayish.rs b/fuzz/src/bin/arrayish.rs index 0fa6791..abb8651 100644 --- a/fuzz/src/bin/arrayish.rs +++ b/fuzz/src/bin/arrayish.rs @@ -26,6 +26,7 @@ arbitrary_stateful_operations! { fn as_slice(&self) -> &[T]; fn clear(&mut self); fn dedup(&mut self); + ...
2
18
2
4c5fbbf9074cee79d961b8ac13f05ea54393860c
Sergey "Shnatsel" Davidoff
2020-07-29T13:40:12
Fuzz: drop workarounds for operations that may panic (#92) Fuzz: drop workarounds for operations that may panic now that rutenspitz compares panic behavior
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 346528a..b38aab3 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] tinyvec = { path = "..", features = ["alloc", "nightly_slice_partition_dedup"] } -rutenspitz = "0.2" +rutenspitz = "0.2.1" honggfuzz = "0.5.45" ar...
3
11
55
5758549693b979d9aff3105c062bc852062c0c26
Jakub Wieczorek
2020-07-28T15:05:11
Fix the fuzzers that stopped compiling (#91)
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 72dcc39..346528a 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -9,6 +9,5 @@ publish = false tinyvec = { path = "..", features = ["alloc", "nightly_slice_partition_dedup"] } rutenspitz = "0.2" honggfuzz = "0.5.45" -arbitrary = "0.2.0" +arbitrary = { version...
4
9
16
b4da5599109562aeeeef72721d968418ba2a7e30
Lokathor
2020-07-24T01:05:59
(cargo-release) start next development iteration 0.4.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index ca80d57..a8a9d22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.1" +version = "0.4.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
af168477d98748b024b1f2e4b4baeb2f92a97deb
Lokathor
2020-07-24T01:05:45
(cargo-release) version 0.4.1
diff --git a/Cargo.toml b/Cargo.toml index a41a2f6..ca80d57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.1-alpha.0" +version = "0.4.1" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
102439ef9d59b621bb4efdf95bfcc106c75eda3e
Soveu
2020-07-23T19:28:01
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 c...
diff --git a/Cargo.toml b/Cargo.toml index 6af07a7..a41a2f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,11 @@ experimental_write_impl = [] # small size without allocation. experimental_array_set = [] +# features that require rustc 1.40 +# use Vec::append if possible in TinyVec::append - 1.37 +# DoubleEnde...
7
229
105
c63b6f8699257839a54b6b6599062fcfa0c9a999
Lokathor
2020-07-18T06:27:39
(cargo-release) start next development iteration 0.4.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 6343dfc..6af07a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0" +version = "0.4.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
b581e014d5605d71e09bf47adeeef2147c5019a8
Lokathor
2020-07-18T06:27:29
(cargo-release) version 0.4.0
diff --git a/Cargo.toml b/Cargo.toml index 8a23944..6343dfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0-alpha.4" +version = "0.4.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
689cc12a110dbb2189a5e26f05ac1fc8edd0d2e7
Benjamin Scherer
2020-07-18T06:22:59
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. spli...
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 3527669..b039a0d 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -147,9 +147,11 @@ impl<A: Array> ArrayVec<A> { #[inline] pub fn append(&mut self, other: &mut Self) { let new_len = self.len() + other.len(); - assert!(new_len <= A::CAPACITY, - ...
4
714
31
3919d5e8047ab85cd8baac591bf2924f10fe8b7f
Soveu
2020-07-17T22:07:10
"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-panic...
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 2d8dadb..3527669 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -146,9 +146,45 @@ impl<A: Array> ArrayVec<A> { /// ``` #[inline] pub fn append(&mut self, other: &mut Self) { + let new_len = self.len() + other.len(); + assert!(new_len <= A::CAPAC...
3
365
71
1bfc9c0479b7f76ed50a037fa863ddc0105c639a
Soveu
2020-07-17T16:21:06
Pre-allocate memory in extend_from_slice, extend and append functions (#80) * change behavior on extend_from_slice, append * preallocation in extend() * append v2 * obviously * fix resize_with
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 5512704..ea2c7b5 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -140,25 +140,58 @@ impl<A: Array> TinyVec<A> { /// Moves the content of the TinyVec to the heap, if it's inline. #[allow(clippy::missing_inline_in_public_items)] pub fn move_to_the_heap(&mut ...
2
55
20
2a97cecaf9c2dcd74e4a142ae848b2dafdc24da5
Lokathor
2020-07-16T03:14:38
(cargo-release) version 0.4.0-alpha.4
diff --git a/Cargo.toml b/Cargo.toml index 526da05..8a23944 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0-alpha.3" +version = "0.4.0-alpha.4" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
736cc08532b1b6b4b6e0b46de02684f1f5c92230
Lokathor
2020-07-16T03:13:02
(cargo-release) version 0.4.0-alpha.3
diff --git a/Cargo.toml b/Cargo.toml index aef42ca..526da05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0-alpha.2" +version = "0.4.0-alpha.3" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
d7588089c8a2c868a0c690b8ffe9e29cc5cf66f3
Benjamin Scherer
2020-07-16T03:02:26
Make capacity() methods not rely on Array::CAPACITY (#83) * Make capacity() methods not rely on Array::CAPACITY Because Array isn't an unsafe trait, unsafe code cannot depend on the length of a slice produced by Array::as_slice to be at least as long as Array::CAPACITY. This means that unsafe code also cannot dep...
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 8c3c859..2d8dadb 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -194,7 +194,10 @@ impl<A: Array> ArrayVec<A> { #[inline(always)] #[must_use] pub fn capacity(&self) -> usize { - A::CAPACITY + // Note: This shouldn't use A::CAPACITY, because unsaf...
2
6
2
477de9c4c37f2ca2344208d8535982716cf6f22b
Lokathor
2020-07-15T12:53:32
Fix https://github.com/Lokathor/tinyvec/issues/79#issuecomment-658747606
diff --git a/Cargo.toml b/Cargo.toml index 9f1195e..aef42ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "Just, really the littlest Vec you could need. So smol." version = "0.4.0-alpha.2" authors = ["Lokathor <zefria@gmail.com>"] edition = "2018" -license = "Zlib" +license = "Zlib OR Apache...
1
1
1
5c390e49a2fcccf13ea5722051b565253225c732
Lokathor
2020-07-15T12:45:39
Relicense from `Zlib` to `Zlib OR Apache-2.0 OR MIT` (#81) * rustfmt * Replace crate description so Shnatsel doesn't need to sign off on the relicense. * write more crate docs.
diff --git a/src/arrayset.rs b/src/arrayset.rs index c498cb1..98e53f7 100644 --- a/src/arrayset.rs +++ b/src/arrayset.rs @@ -2,7 +2,7 @@ // This was contributed by user `dhardy`! Big thanks. -use super::{Array, take}; +use super::{take, Array}; use core::{ borrow::Borrow, fmt, diff --git a/src/lib.rs b/src/...
2
41
48
7f6a5835fa27ea3d2e530b61762dec2b23920e11
Lokathor
2020-07-08T13:19:57
(cargo-release) version 0.4.0-alpha.2
diff --git a/Cargo.toml b/Cargo.toml index 858f2f0..9f1195e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0-alpha.1" +version = "0.4.0-alpha.2" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
f0ff750075799775e13fac037e700b47d605e356
Lokathor
2020-07-08T13:19:05
prep alpha release
diff --git a/Cargo.toml b/Cargo.toml index f4fbe8c..858f2f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.4.0" +version = "0.4.0-alpha.1" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
ebf14aa539f6ab4b603b173a580ab2d9a2149e62
Lokathor
2020-07-04T03:45:55
fix my own error
diff --git a/src/arrayset.rs b/src/arrayset.rs index 291178a..c498cb1 100644 --- a/src/arrayset.rs +++ b/src/arrayset.rs @@ -134,7 +134,7 @@ where arr.swap(i, l1); } self.len -= L::from(1); - return take(&mut arr[l1]); + return Some(take(&mut arr[l1])); } } No...
1
1
1
26f4f28942e990154f4aeea0e0071a4ab43af77f
Lokathor
2020-07-04T03:34:57
Update arrayset.rs
diff --git a/src/arrayset.rs b/src/arrayset.rs index bee59fe..291178a 100644 --- a/src/arrayset.rs +++ b/src/arrayset.rs @@ -2,7 +2,7 @@ // This was contributed by user `dhardy`! Big thanks. -use super::Array; +use super::{Array, take}; use core::{ borrow::Borrow, fmt,
1
1
1
0fdcd0b4db28b1f62a91e886a914160065d31e41
Benjamin Scherer
2020-06-18T15:22:21
Modify tiny_vec! to avoid error on non-Copy types (#74) * Modify tiny_vec! to avoid error on non-Copy types Using $elem in two closures in the previous version of the macro created errors when using types that don't implement Copy. Moving the decision of whether to allocate or use an inline array to the macro inv...
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 7fe65ee..faf9a66 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -46,11 +46,10 @@ macro_rules! tiny_vec { const INVOKED_ELEM_COUNT: usize = 0 $( + { let _ = stringify!($elem); 1 })*; // If we have more `$elem` than the `CAPACITY` we will simply go dir...
2
20
12
a5552d22e56e84b04927fb2080a753af9649f9e5
Diggory Hardy
2020-06-18T15:21:53
Implement ArraySet (#73)
diff --git a/src/arrayset.rs b/src/arrayset.rs new file mode 100644 index 0000000..130bfab --- /dev/null +++ b/src/arrayset.rs @@ -0,0 +1,291 @@ +use core::borrow::Borrow; +use core::fmt; +use core::mem::swap; +use core::ops::{AddAssign, SubAssign}; +use super::Array; + +/// Error resulting from attempting to insert in...
2
294
0
3beff97fa6042a6bfaeea480d462ffadc4a22d35
Lokathor
2020-04-22T18:31:56
Add the SliceVec type (#68) * start of slicevec * remove todo! because it's not in 1.36 * Update Cargo.toml * slice vec into iterator * slicevec drain * complete last unimplemented * remove the extra default feature * spelling * Update src/slicevec.rs Co-Authored-By: Joshua Nelson <joshua@yo...
diff --git a/Cargo.toml b/Cargo.toml index 8192a8f..1201bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,11 +15,11 @@ repository = "https://github.com/Lokathor/tinyvec" [features] default = [] -# Provide things that utilize the `alloc` crate. +# Provide things that utilize the `alloc` crate, namely `TinyVec`. a...
5
1,121
76
ef900b1ce6510eb2fbaff3df5005f998af02a02d
Josh Stone
2020-03-31T19:36:39
impl IntoIterator for &/&mut ArrayVec (#69) These just create slice iterators, but the impls are useful to have for contexts that don't auto-deref, as in the new tests.
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index f2bbeb0..49b3bb4 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -959,6 +959,26 @@ impl<A: Array> IntoIterator for ArrayVec<A> { } } +impl<'a, A: Array> IntoIterator for &'a mut ArrayVec<A> { + type Item = &'a mut A::Item; + type IntoIter = core::slice:...
3
31
3
80e5359ccfc0ff65ddd0ecfb1bfa78ee50d175dd
Lokathor
2020-03-26T00:09:35
start next version
diff --git a/Cargo.toml b/Cargo.toml index 798fc8a..8192a8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.3" +version = "0.3.4-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
a95c3f900b7876104015ea58e6790fc7c1acf420
Lokathor
2020-03-26T00:07:03
(cargo-release) version 0.3.3
diff --git a/Cargo.toml b/Cargo.toml index 29609db..798fc8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.3-alpha.0" +version = "0.3.3" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
e0a598fb343d3c4cf198db30c7237d64621cf144
Evgeny Rozaliev
2020-03-17T20:15:39
TinyVec::from([T]) (#66)
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 1dbfa48..90c197d 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -709,6 +709,12 @@ impl<A: Array> From<ArrayVec<A>> for TinyVec<A> { } } +impl<A: Array> From<A> for TinyVec<A> { + fn from(array: A) -> Self { + TinyVec::Inline(ArrayVec::from(array)) + } +...
2
13
0
927fad5a212d7f762918c4389f2d5275477cd9f6
Lokathor
2020-02-11T19:32:18
Update arrayvec.rs
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 3bf4ecd..f2bbeb0 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -1031,7 +1031,7 @@ impl<A: Array<Item=u8>> core::fmt::Write for ArrayVec<A> let my_len = self.len(); let str_len = s.as_bytes().len(); if my_len + str_len <= A::CAPACITY { - le...
1
1
1
d778fec9fb9ffe8c21e8df2fb233e4e4704d6c14
Lokathor
2020-02-11T19:15:19
Update arrayvec.rs
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index d45041c..3bf4ecd 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -1025,16 +1025,15 @@ where } #[cfg(feature = "experimental_write_impl")] -impl<A> core::fmt::Write for ArrayVec<A> -where - A: Array, - A::Item: From<u8>, +impl<A: Array<Item=u8>> core::fmt:...
1
7
8
0bd7f43809b972efba409213f9b93f9b75071f4e
Lokathor
2020-02-11T03:14:20
Improve Write impl efficiency
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 9ffe9e4..d45041c 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -1031,16 +1031,14 @@ where A::Item: From<u8>, { fn write_str(&mut self, s: &str) -> core::fmt::Result { - if self.len() + s.as_bytes().len() > A::CAPACITY { - return Err(core::fmt::...
1
6
8
3c40846511161652e560858cad15fc862c006587
Lokathor
2020-02-11T03:06:35
oops, dumb lifetimes.
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 625022c..1dbfa48 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -771,7 +771,7 @@ impl<A: Array> TinyVecIterator<A> { } } } -impl<'p, A: Array> FusedIterator for TinyVecIterator<'p, A> { } +impl<A: Array> FusedIterator for TinyVecIterator<A> { } impl<A: A...
1
1
1
b80cbbc07b9299bff9c6305a23ae1b9ddd283146
Lokathor
2020-02-11T03:02:56
put in a highly experimental Write impl for ArrayVec of bytes
diff --git a/Cargo.toml b/Cargo.toml index 82fbade..29609db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,10 @@ nightly_slice_partition_dedup = [] # use const generics for arrays nightly_const_generics = [] +# NOT considered part of the crate's SemVer!!! +# This experimental feature adds `core::fmt::Write` ...
2
24
0
6ab291baab1d751cd1a01117b753fc52aa45088f
Lokathor
2020-02-11T02:52:15
Closes https://github.com/Lokathor/tinyvec/issues/48
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 97699fd..3f37ce8 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -808,6 +808,7 @@ impl<'p, A: Array> Iterator for ArrayVecDrain<'p, A> { } } } +impl<'p, A: Array> FusedIterator for ArrayVecDrain<'p, A> { } impl<'p, A: Array> Drop for ArrayVecDrain<'p,...
3
5
3
9b98f894cb020cd51d83445e24cab24ceb69fa2c
dxenonb
2020-02-07T01:57:22
Fix typo
diff --git a/src/lib.rs b/src/lib.rs index 238779c..1144267 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,7 @@ //! `unsafe` internals. `#![forbid(unsafe_code)]`. //! 2) No required dependencies. //! * We might provide optional dependencies for extra functionality (eg: -//! `serde` compatability). ...
1
3
3
70269ee8f4bfe0b763a02ea97a14baa39e28dd6e
Lokathor
2020-01-30T01:54:19
(cargo-release) start next development iteration 0.3.3-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index e52f262..82fbade 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.2" +version = "0.3.3-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
89847bcaa2611fa609398e526dc5d8bdc69c5fbd
Lokathor
2020-01-30T01:54:16
(cargo-release) version 0.3.2
diff --git a/Cargo.toml b/Cargo.toml index d307962..e52f262 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.2-alpha.0" +version = "0.3.2" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
0c915a5711fe15f5def28779506767bf20a7713e
Wim Looman
2020-01-27T13:38:26
Allow inferring array type for macro constructors
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 5ccd5a9..97699fd 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -11,9 +11,13 @@ use super::*; /// ```rust /// use tinyvec::*; /// +/// // The backing array type can be specified in the macro call /// let empty_av = array_vec!([u8; 16]); -/// /// let some_...
2
41
8
78bc811b7339cc192143f0c0db823b9187c243e9
Wim Looman
2020-01-28T11:49:20
Add benchmarks of tiny_vec macro
diff --git a/Cargo.toml b/Cargo.toml index 649aabf..d307962 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,14 @@ all-features = true [workspace] members = ["fuzz"] +[dev-dependencies] +criterion = "0.3.0" + [[test]] name = "tinyvec" required-features = ["alloc"] + +[[bench]] +name = "macros" +harness = fa...
2
56
0
5bbed8e98c68d26ce4916e70ae94b0d5578c2433
Wim Looman
2020-01-28T11:46:39
Make macros work without any other imports
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index bcf8be9..5ccd5a9 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -19,13 +19,13 @@ use super::*; macro_rules! array_vec { ($array_type:ty) => { { - let av: ArrayVec<$array_type> = Default::default(); + let av: $crate::ArrayVec<$array_type> = D...
3
9
8
d9d4a7f96404cbf04b6271357e27ebd90ee137bc
Wim Looman
2020-01-28T11:43:32
Allow trailing comma in tiny_vec!
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 8efd13d..0eb686e 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -29,7 +29,7 @@ macro_rules! tiny_vec { tv } }; - ($array_type:ty, $($elem:expr),*) => { + ($array_type:ty, $($elem:expr),* $(,)?) => { { // Note(Lokathor): This goofy look...
1
3
3
f829193f4eeea54494a73b5c0bf42472d7ed40cb
mgostIH
2020-01-26T21:25:33
Fixed links in documentation by removing ::<A>
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 41af1bd..bcf8be9 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -57,8 +57,8 @@ macro_rules! array_vec { /// assert_eq!(some_ints.len(), 3); /// ``` /// -/// The [`default`](ArrayVec::<A>::new) for an `ArrayVec` is to have a default -/// array with length 0....
1
4
4
d1b06fbd90633b4cbea442b1a280bf305ed54aca
Lokathor
2020-01-26T21:20:40
Update tinyvec.rs
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index a6c223f..8efd13d 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -31,9 +31,23 @@ macro_rules! tiny_vec { }; ($array_type:ty, $($elem:expr),*) => { { - let mut tv: TinyVec<$array_type> = Default::default(); - $( tv.push($elem); )* - tv + ...
1
17
3
8fb65da6a366342a6b22ba0a22685bed2af48c25
Lokathor
2020-01-26T20:38:38
docs, and fix up tiny_vec macro
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 2efa76e..477b445 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -15,9 +15,11 @@ use alloc::vec::Vec; /// ```rust /// use tinyvec::*; /// -/// let empty_av = tiny_vec!([u8; 16]); +/// let empty_tv = tiny_vec!([u8; 16]); /// /// let some_ints = tiny_vec!([i32; ...
1
43
26
da82aa007a78f95285a1313e40acba1ea07b6e99
mgostIH
2020-01-26T12:51:25
Added more efficient implementation for ArrayVecDrain, changed a few internal members of the struct, tests passed
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 5c75b14..278b211 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -235,8 +235,9 @@ impl<A: Array> ArrayVec<A> { ); ArrayVecDrain { parent: self, + target_start: start, target_index: start, - target_count: end - start, + tar...
1
15
7
44455944d4cc3f95464db231b87fd89ab1c997ae
Wim Looman
2020-01-24T13:39:46
impl Debug for {Tiny,Array}VecIterator
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 5c75b14..8864a42 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -814,6 +814,14 @@ pub struct ArrayVecIterator<A: Array> { len: usize, data: A, } + +impl<A: Array> ArrayVecIterator<A> { + /// Returns the remaining items of this iterator as a slice. + p...
2
31
0
f845cfa2bf210ac7e55351af38dae45d9d4c1223
Wim Looman
2020-01-24T13:28:57
impl IntoIterator for &[mut] TinyVec
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index ab4e5e4..4123fce 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -737,6 +737,26 @@ impl<A: Array> IntoIterator for TinyVec<A> { } } +impl<'a, A: Array> IntoIterator for &'a mut TinyVec<A> { + type Item = &'a mut A::Item; + type IntoIter = alloc::slice::Iter...
1
20
0
0dababa9fea847584f604ee0d5b505fdb342b0a1
Wesley Norris
2020-01-24T13:24:44
Add TinyVec::from(slice) test
diff --git a/tests/tinyvec.rs b/tests/tinyvec.rs index 705ab59..617193a 100644 --- a/tests/tinyvec.rs +++ b/tests/tinyvec.rs @@ -65,3 +65,22 @@ fn TinyVec_resize() { tv.resize(20, 5); assert_eq!(&tv[..], &[5; 20]); } + +#[test] +fn TinyVec_from_slice_impl() { + let bigger_slice: [u8; 11] = [0, 1, 2, 3, 4, 5, 6,...
1
19
0
d6d1c9db073bdc6b18be7353f34549f64f4d2537
Lokathor
2020-01-24T09:46:18
Convert code notes into GitHub issues
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 94adfc7..5ca8eab 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -422,8 +422,6 @@ impl<A: Array> ArrayVec<A> { item } - // NIGHTLY: remove_item, https://github.com/rust-lang/rust/issues/40062 - /// Resize the vec to the new length. /// /// I...
2
0
10
ca709b0864f8b098aff34a9135625d9e11c5a8d5
Lokathor
2020-01-24T09:38:18
cleanups
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 5c75b14..94adfc7 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -32,12 +32,55 @@ macro_rules! array_vec { }; } -/// An array-backed vector-like data structure. +/// An array-backed, vector-like data structure. /// -/// * Fixed capacity (based on array s...
2
167
107
e327e82cab66ad77bfcd0c339aed52696a7f8aa0
Lokathor
2020-01-24T09:38:03
pipe down ya silly compiler
diff --git a/src/lib.rs b/src/lib.rs index 97eab32..bd22858 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ feature = "nightly_slice_partition_dedup", feature(slice_partition_dedup) )] +#![cfg_attr(feature = "nightly_const_generics", allow(incomplete_features))] #![cfg_attr(feature = "nightly_const_gen...
1
1
0
0e6efef26f1ff8eb152245d8095383e8c9b001fb
Lokathor
2020-01-24T07:41:23
take should really always be inlined
diff --git a/src/lib.rs b/src/lib.rs index 12888a8..97eab32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,7 @@ mod tinyvec; pub use crate::tinyvec::*; // TODO MSRV(1.40.0): Just call the normal `core::mem::take` +#[inline(always)] fn take<T: Default>(from: &mut T) -> T { replace(from, T::default()) }
1
1
0
dea4143fb605132c1ea92a222c8b0f29fe6e7e91
Lokathor
2020-01-24T07:38:45
must_use on Array methods
diff --git a/src/array.rs b/src/array.rs index c152258..472462f 100644 --- a/src/array.rs +++ b/src/array.rs @@ -39,10 +39,12 @@ impl<T: Default, const N: usize> Array for [T; N] { type Item = T; const CAPACITY: usize = N; #[inline(always)] + #[must_use] fn as_slice(&self) -> &[T] { &*self } #[i...
1
4
0
05abdd60417bffe7390ba1ed01118b9eeea0713d
Lokathor
2020-01-24T07:37:02
Update tinyvec.rs
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index ab4e5e4..31db439 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -723,6 +723,7 @@ impl<A: Array> Iterator for TinyVecIterator<A> { } } } +// TODO: fused iterator impl<A: Array> IntoIterator for TinyVec<A> { type Item = A::Item;
1
1
0
a2fac3ba675e6eba117fd6b86a99bf02a68f9706
Wesley Norris
2020-01-23T22:58:27
Add From<&[T]> and From<&mut [T]> for TinyVec This adds the From trait impls for `&[T]` and `&mut [T]` to `TinyVec`, though unfortunately until we get lazy normalization, it currently requires that the `A: Array<item = T>` bound also be `Default`, so it does not work for array sizes > 32.
diff --git a/src/tinyvec.rs b/src/tinyvec.rs index ab4e5e4..c28e3ad 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -665,6 +665,37 @@ impl<A: Array> From<ArrayVec<A>> for TinyVec<A> { } } +impl<T, A> From<&'_ [T]> for TinyVec<A> +where + T: Clone + Default, + A: Array<Item = T> + Default, +{ + #[inline] + ...
1
31
0
c3b25e943eea887ad29b2adfa55d4e4f3fd4dab1
Lokathor
2020-01-21T01:59:27
(cargo-release) start next development iteration 0.3.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index b3bd7d5..649aabf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.1" +version = "0.3.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
a0435d4d2c81beb2b0d4ac68a12e7a109768b749
Lokathor
2020-01-21T01:59:12
(cargo-release) version 0.3.1
diff --git a/Cargo.toml b/Cargo.toml index f377792..b3bd7d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.1-alpha.0" +version = "0.3.1" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
4907f0267fa31a8b85e83ac064bf49c45a125d26
Lokathor
2020-01-21T01:48:18
add Hash to ArrayVec and TinyVec
diff --git a/src/arrayvec.rs b/src/arrayvec.rs index f665498..5c75b14 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -918,24 +918,15 @@ where } } -/* - -I think, in retrospect, this is useless? - -The `&mut [A::Item]` should coerce to `&[A::Item]` and use the above impl. -I'll leave it here for now though ...
3
9
26
1365471f90e1a5e02ee1aa654251932285cf3c22
Lokathor
2020-01-19T22:02:45
(cargo-release) start next development iteration 0.3.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 8a596a2..f377792 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.0" +version = "0.3.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
556f6ddbe45797aac56d531889d0f0bbe0ee3ab7
Lokathor
2020-01-19T22:02:42
(cargo-release) version 0.3.0
diff --git a/Cargo.toml b/Cargo.toml index c0dbcfa..8a596a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "0.3.0-alpha.0" +version = "0.3.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2...
1
1
1
5fce6c9774523de13dbd81a075743b0c613fa6ae
Lokathor
2020-01-19T22:02:14
ready for a 0.3
diff --git a/Cargo.toml b/Cargo.toml index 16806d1..c0dbcfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "Just, really the littlest Vec you could need. So smol." -version = "1.0.0-alpha.0" +version = "0.3.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] edit...
1
1
1
70dcd4d4c5ea243913625164047cf16ebf242e79
Lokathor
2020-01-19T20:21:25
improve the note
diff --git a/src/lib.rs b/src/lib.rs index 463917c..bb19bd2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,7 +86,7 @@ mod tinyvec; #[cfg(feature = "alloc")] pub use crate::tinyvec::*; -// Replace with mem::take as soon as MSRV allows it +// TODO MSRV(1.40.0): Just call the normal `core::mem::take` fn take<T: Defa...
1
1
1
4a4a5f00465379ac6c7068c1b2d460aaf13f1182
Lokathor
2020-01-19T20:04:08
fix an ambiguity warning/error thing
diff --git a/src/lib.rs b/src/lib.rs index 87cd9d4..463917c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,7 +84,7 @@ pub use arrayvec::*; #[cfg(feature = "alloc")] mod tinyvec; #[cfg(feature = "alloc")] -pub use tinyvec::*; +pub use crate::tinyvec::*; // Replace with mem::take as soon as MSRV allows it fn take...
1
1
1