Go to file
openharmony_ci 2248f7b1c5
!5 OAT问题解决
Merge pull request !5 from kbm1w9y0j/license-issue-wei
2023-05-26 05:06:05 +00:00
.github/workflows Fix building on Rust 1.34 with alloc feature enabled (#154) 2021-11-09 12:25:23 -07:00
benches Benchmarks comparing TinyVec to SmallVec (#150) 2021-09-26 13:03:06 -06:00
fuzz rustfmt 2020-10-13 12:16:40 -06:00
src Error implementation for TryFromSliceError (#160) 2022-04-23 12:18:14 -06:00
src-backup Formally move the arrayset into a backup folder. It will become a separate crate some day. 2020-08-08 19:04:39 -06:00
tests add try_ functions for fallible heap growth (#158) 2022-04-20 12:43:34 -06:00
.gitignore base files 2020-01-06 19:29:40 -07:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 18:26:25 +08:00
Cargo.toml (cargo-release) version 1.6.0 2022-04-25 10:34:31 -06:00
CHANGELOG.md Update CHANGELOG.md 2022-04-25 09:36:13 -06:00
compare_benchmarks.py Benchmarks comparing TinyVec to SmallVec (#150) 2021-09-26 13:03:06 -06:00
gen-array-impls.sh Replace A: Default bounds by a constructor on Array (#112) 2020-08-17 10:55:51 -06:00
LICENSE-APACHE.md Replace LICENSE-APACHE.md with official text (#140) 2021-04-01 17:16:10 -06:00
LICENSE-MIT.md add license files (#120) 2020-10-11 18:42:11 -06:00
LICENSE-ZLIB.md base files 2020-01-06 19:29:40 -07:00
OAT.xml Incompatible file license issues 2023-05-25 15:48:50 +08:00
README.md Cratesio fix (#104) 2020-08-09 09:13:26 -06:00
README.OpenSource CI OAT 告警清零与README.OpenSource 中License信息整改 2023-05-04 11:15:19 +08:00
rustfmt.toml improve clone impl as per https://github.com/Lokathor/tinyvec/issues/143 (#144) 2021-07-21 18:11:46 -06:00

License:Zlib Minimum Rust Version crates.io docs.rs

Unsafe-Zero-Percent

tinyvec

A 100% safe crate of vec-like types. #![forbid(unsafe_code)]

Main types are as follows:

  • ArrayVec is an array-backed vec-like data structure. It panics on overflow.
  • SliceVec is the same deal, but using a &mut [T].
  • TinyVec (alloc feature) is an enum that's either an Inline(ArrayVec) or a Heap(Vec). If a TinyVec is Inline and would overflow it automatically transitions to Heap and continues whatever it was doing.

To attain this "100% safe code" status there is one compromise: the element type of the vecs must implement Default.

For more details, please see the docs.rs documentation