Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 #138

Merged
merged 75 commits into from
Sep 13, 2023
Merged

1.0 #138

Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
6adb76d
1.0 WIP
novacrazy Mar 26, 2023
31a0251
Make ArrayLength static
novacrazy Mar 26, 2023
5a2a6e7
Merge branch 'master' of https://github.com/fizyk20/generic-array int…
novacrazy Mar 26, 2023
ad42487
Changelog
novacrazy Mar 26, 2023
c904b5e
Replace `From<&[T]>` with `TryFrom<&[T]>`
novacrazy Mar 27, 2023
46340ef
Update readme/docs
novacrazy Mar 27, 2023
8cbb4de
More cleanup for trivial/transparent methods
novacrazy Mar 27, 2023
7ad2199
Revisit ArrayBuilder and Deserialize
novacrazy Mar 27, 2023
5cd91da
Add TryFrom<Vec<T>> with `alloc` feature
novacrazy Mar 28, 2023
8c6a4a3
Merge branch 'zeroize-docs' into 1.0
novacrazy Mar 28, 2023
e05c162
Note alloc feature in docs
novacrazy Mar 28, 2023
dcab3ff
Additional alloc conversions
novacrazy Mar 28, 2023
8c24899
Use slice_from_raw_parts_mut
novacrazy Mar 28, 2023
cc4d7d0
Expand alloc features further
novacrazy Mar 28, 2023
ea9d381
Simplify arr! macro syntax
novacrazy Mar 28, 2023
266e3db
Fix typo
novacrazy Mar 28, 2023
5f6a960
Possibly fix typenum docs links
novacrazy Mar 29, 2023
d214ab3
Implement FunctionalSequence for Box<GenericArray>
novacrazy Mar 29, 2023
83df52f
Update changelog
novacrazy Mar 29, 2023
abfc4e8
Update changelog again
novacrazy Mar 29, 2023
9f64710
Cleanup
novacrazy Mar 29, 2023
96df674
Update readme example
novacrazy Mar 29, 2023
2e6a279
Add default_boxed
novacrazy Mar 29, 2023
2f89e00
Improve docs
novacrazy Mar 29, 2023
b9069fa
Implement #140
novacrazy Mar 30, 2023
a677e27
Double-check transmute sizes
novacrazy Mar 30, 2023
00d7839
Add IntoArrayLength and ConstArrayLength
novacrazy Mar 30, 2023
0b7a0f7
impl IntoArrayLength for ArrayLength
novacrazy Mar 30, 2023
f99180d
Documentation and hidden features improvements
novacrazy Mar 30, 2023
f10353e
Move module, seal ArrayType, docs, unreachables
novacrazy Mar 31, 2023
4b55566
Hopefully fix docs metadata + playground metadata
novacrazy Mar 31, 2023
447ef9f
Remove build-script
novacrazy Mar 31, 2023
1cbb9e3
Tweak module visibility
novacrazy Mar 31, 2023
a918217
Remove misleading wording
novacrazy Apr 3, 2023
4116d32
Remove unused code
novacrazy Apr 4, 2023
5edf2d1
Improve const usage
novacrazy Aug 15, 2023
15e7030
Safety tweaks
novacrazy Aug 15, 2023
055c33b
from_iter tweaks
novacrazy Aug 15, 2023
9ae35f9
Formatting
novacrazy Aug 16, 2023
6dd4353
Update tests
novacrazy Aug 16, 2023
6196139
Optimize hex impl
novacrazy Aug 17, 2023
29cd8b2
Fix boxed ga iter handling to match stack ga
novacrazy Aug 17, 2023
9ac6c2f
Update changelog
novacrazy Aug 17, 2023
52f8565
Massively simplify and expand `arr![]` implementation
novacrazy Aug 19, 2023
dc4d22e
Cleanup
novacrazy Aug 19, 2023
989411d
Partially revert arr macro in typenum case and cleanup
novacrazy Aug 20, 2023
8e20c48
Fix try_from_iter pre-checks
novacrazy Aug 21, 2023
091c125
Improve documentation
novacrazy Aug 21, 2023
e8d2471
Update changelog
novacrazy Aug 21, 2023
8d30033
Fix pre-checks in try_boxed_from_iter
novacrazy Aug 23, 2023
9c4b0d8
Cleanup
novacrazy Aug 23, 2023
bb7c68b
Implement #145
novacrazy Aug 25, 2023
145b331
docs
novacrazy Aug 25, 2023
afd86c9
Cleanup
novacrazy Aug 26, 2023
01a6b7b
Remove TryFromIterError
novacrazy Aug 26, 2023
67e7ff8
Merge branch 'master' into 1.0
novacrazy Aug 30, 2023
6184c80
Match std with tuple/array conversions
novacrazy Sep 2, 2023
21d74a9
Update Changelog
novacrazy Sep 3, 2023
d558a84
Improve MaybeUninit usage with ga
novacrazy Sep 3, 2023
7e45005
Make sure autovectorizations won't be missed
novacrazy Sep 3, 2023
ff7a355
Cleanup
novacrazy Sep 4, 2023
bf79da9
Use drop_in_place and other optimizations
novacrazy Sep 4, 2023
14b3b4e
Cleanup and paranoia
novacrazy Sep 4, 2023
4246cbe
Add try_from_slice const fallible conversion
novacrazy Sep 5, 2023
1c25952
Docs cleanup
novacrazy Sep 5, 2023
773aedc
Use regular transmutes where applicable
novacrazy Sep 5, 2023
fb7f25c
Precheck length for deserialization
novacrazy Sep 6, 2023
37dc6ae
Add associated len method
novacrazy Sep 6, 2023
1f4e04c
Avoid macro recursion limits with box_arr
novacrazy Sep 12, 2023
5f9e39b
Clarify behavior
novacrazy Sep 12, 2023
6bf498e
Implement nth_back
novacrazy Sep 12, 2023
8d65d41
Adjust inlining
novacrazy Sep 12, 2023
5aa4e27
Improve chunks_from_slice_mut
novacrazy Sep 12, 2023
9b12a1a
Faster hex encoding (#144)
novacrazy Sep 13, 2023
7e53053
Cleanup
novacrazy Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
* **`1.0.0`**
* **Use GATs for `ArrayLength`** !
* Bump MSRV to 1.65.0
* Use Rust 2021 edition [#118](https://github.com/fizyk20/generic-array/pull/118) + non-PR upgrade later with GATs.
* Allow `arr!` macro in `const` [#129](https://github.com/fizyk20/generic-array/pull/129)
* Add `arr!` repeat-expressions [#130](https://github.com/fizyk20/generic-array/pull/130)
* Implement `const-default` trait support [#131](https://github.com/fizyk20/generic-array/pull/131)
* Make `as_slice()/from_slice()` const.
* Add const `from_array`/`into_array` methods.
* Make `ArrayLength: 'static`
* Replace `From<&[T]>` with `TryFrom<&[T]>`
* Add `try_from_iter` for fallible construction from iterator.
* Use `typenum`'s `const-generics` feature for `const N: usize`-based `From` implementations between `[T; N]` and `GenericArray<T, N>`
* Also added the `IntoArrayLength` trait and `ConstArrayLength` type-alias for working with typenum's `Const<N>` easier.
* `alloc` crate feature
* Added `box_arr!` macro with the same syntax as `arr!`, but returns a `Box<GenericArray<T, N>>`
* Moving between heap and stack
* `impl TryFrom<Vec<T>> for GenericArray<T, N>`
* `impl TryFrom<Box<[T]>> for GenericArray<T, N>`
* `impl From<GenericArray<T, N>> for Vec<T>`
* `impl From<GenericArray<T, N>> for Box<[T]>`
* Methods for converting between `Box<GenericArray<T, N>>` and `Vec<T>`/`Box<[T]>`
* `GenericSequence` and `FunctionalSequence` implemented for `Box<GenericArray<T, N>>`, allowing for heap-based manipulation of fixed-size arrays.
* `Deserialize` no longer requires `T: Default`
* Make `IntoArrayLength`, `MappedSequence`, and `FunctionalSequence` safe traits.
* Simplify `arr!` macro syntax.
* `arr![1, 2, 3, 4]` or `arr![T; N]` forms, no explicit length for first variant.
* No longer casts given expressions internally.
* Type-deduction works similarly to `vec![]`, in that an empty array has an unknown type
* Add the `internals` Cargo feature to expose dangerous things.
* Added additional methods for working with chunks of arrays.
* Added `From` impls for tuples with 1-12 (inclusive) items of the same type, matching the standard library.
* Workaround potential Rust/LLVM regressions with `FunctionalSequence::zip()`/`::map()`
* Improve documentation

* **`0.14.6`**
* Add an optional `Zeroize` impl for `GenericArray` ([#126](https://github.com/fizyk20/generic-array/pull/126) and [#112](https://github.com/fizyk20/generic-array/pull/112))
* Cleanup some unsafe ([#125](https://github.com/fizyk20/generic-array/pull/125)) and typos ([#114](https://github.com/fizyk20/generic-array/pull/114))
Expand Down
25 changes: 14 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]

name = "generic-array"
version = "0.14.6"
authors = [ "Bartłomiej Kamiński <[email protected]>", "Aaron Trent <[email protected]>" ]
edition = "2018"
version = "1.0.0"
authors = ["Bartłomiej Kamiński <[email protected]>", "Aaron Trent <[email protected]>"]
edition = "2021"

description = "Generic types implementing functionality of arrays"
readme = "README.md"
Expand All @@ -15,7 +15,7 @@ repository = "https://github.com/fizyk20/generic-array.git"

keywords = ["generic", "array"]
categories = ["data-structures", "no-std"]
include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md", "build.rs"]
include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md"]

[badges]
travis-ci = { repository = "fizyk20/generic-array" }
Expand All @@ -24,21 +24,24 @@ travis-ci = { repository = "fizyk20/generic-array" }
name = "generic_array"

[features]
more_lengths = []
alloc = []
internals = []

[dependencies]
typenum = "1.12"
typenum = { version = "1.16", features = ["const-generics"] }
const-default = { version = "1", optional = true, default-features = false }
serde = { version = "1.0", optional = true, default-features = false }
zeroize = { version = "1", optional = true, default-features = false }

[dev_dependencies]
[dev-dependencies]
# this can't yet be made optional, see https://github.com/rust-lang/cargo/issues/1596
serde_json = "1.0"
bincode = "1.0"

[build_dependencies]
version_check = "0.9"

[package.metadata.docs.rs]
features = ["serde", "zeroize"]
# all but "internals", don't show those on docs.rs
features = ["serde", "zeroize", "const-default", "alloc"]
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.playground]
all-features = true
Loading