diff --git a/README.md b/README.md index 42a27c2..d4086ac 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ## bounded-vec `BoundedVec` - Non-empty rust `std::vec::Vec` wrapper with type guarantees on lower(`L`) and upper(`U`) bounds for items quantity. Inspired by [vec1](https://github.com/rustonaut/vec1). + This crate is `#![no_std]` compatible with `alloc`. ## Example @@ -21,8 +22,8 @@ assert_eq!(data, [2u8,4].into()); ``` ## Crate features -- optional(non-default) `serde` feature that adds serialization to `BoundedVec`. -- optional(non-default) `schema` feature that adds JSON schema support via `schemars` (requires `serde`). +- optional(non-default) [serde](https://serde.rs/) feature that adds serialization to `BoundedVec`. +- optional(non-default) `schema` feature that adds JSON schema support via [schemars](https://graham.cool/schemars) (requires `serde`). - optional(non-default) `arbitrary` feature that adds `proptest::Arbitrary` implementation to `BoundedVec`. ## Changelog diff --git a/src/bounded_vec.rs b/src/bounded_vec.rs index b0ce069..f4755f2 100644 --- a/src/bounded_vec.rs +++ b/src/bounded_vec.rs @@ -8,7 +8,7 @@ use thiserror::Error; /// /// # Type Parameters /// -/// * `W` - witness type to prove vector ranges and shape if interface accordingly +/// * `W` - witness type to prove vector ranges and shape of interface accordingly #[derive(PartialEq, Eq, Debug, Clone, Hash, PartialOrd, Ord)] pub struct BoundedVec> { inner: Vec, @@ -149,7 +149,7 @@ impl BoundedVec> { } } -/// Part which works for all witnesses +/// Methods which works for all witnesses impl BoundedVec { /// Returns a reference to underlying `Vec`` ///