From 3322beaa56eea0284d83ce1ca3d9d91f9b8c9967 Mon Sep 17 00:00:00 2001 From: Kamal Ahmad Date: Thu, 5 Jun 2025 01:53:32 +0500 Subject: [PATCH] Fix some documentation spelling issues, add links to serde & schemars in README --- README.md | 5 +++-- src/bounded_vec.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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`` ///