diff --git a/README.md b/README.md index b3dd6a99b..96ff7fbfd 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ fn test_simple_struct() { ## Features Opting out from Serde allows borsh to have some features that currently are not available for serde-compatible serializers. -Currently we support two features: `borsh(init=` and `borsh(skip)` (the former one not available in Serde). +Currently we support two features: `borsh(init=` and `borsh(skip)` (the former one not available in Serde). `borsh(init=...)` allows to automatically run an initialization function right after deserialization. This adds a lot of convenience for objects that are architectured to be used as strictly immutable. Usage example: @@ -65,7 +65,7 @@ impl Message { } ``` -`borsh(skip)` allows to skip serializing/deserializing fields, assuming they implement `Default` trait, similary to `#[serde(skip)]`. +`borsh(skip)` allows to skip serializing/deserializing fields, assuming they implement `Default` trait, similarly to `#[serde(skip)]`. ```rust #[derive(BorshSerialize, BorshDeserialize)] diff --git a/borsh-derive/src/lib.rs b/borsh-derive/src/lib.rs index dc32becfb..c5e8d48f9 100644 --- a/borsh-derive/src/lib.rs +++ b/borsh-derive/src/lib.rs @@ -891,7 +891,7 @@ where Each of `declaration` and `definitions` nested sub-attributes takes literal string value, which is a syn's [ExprPath](syn::ExprPath). -Currently both `declaration` and `definitions` are required to be specifed at the same time. +Currently both `declaration` and `definitions` are required to be specified at the same time. ###### usage diff --git a/borsh/src/schema.rs b/borsh/src/schema.rs index 8d6b45108..18c1e056c 100644 --- a/borsh/src/schema.rs +++ b/borsh/src/schema.rs @@ -9,7 +9,7 @@ //! * `BorshSchema` trait allows any type that implements it to be self-descriptive, i.e. generate it's own schema; //! * `Declaration` is used to describe the type identifier, e.g. `HashMap`; //! * `Definition` is used to describe the structure of the type; -//! * `BorshSchemaContainer` is used to store all declarations and defintions that are needed to work with a single type. +//! * `BorshSchemaContainer` is used to store all declarations and definitions that are needed to work with a single type. #![allow(dead_code)] // Unclear why rust check complains on fields of `Definition` variants. use crate as borsh; // For `#[derive(BorshSerialize, BorshDeserialize)]`. diff --git a/borsh/src/schema/container_ext/validate.rs b/borsh/src/schema/container_ext/validate.rs index e8957dc31..2c9d3178f 100644 --- a/borsh/src/schema/container_ext/validate.rs +++ b/borsh/src/schema/container_ext/validate.rs @@ -32,7 +32,7 @@ pub enum Error { /// Declared tag width is too small. Tags must be large enough to represent /// possible length of sequence. TagTooNarrow(Declaration), - /// only 0, 1, 2, 4 and 8 bytes long enum tags and sequences' `length_width` are alowed + /// only 0, 1, 2, 4 and 8 bytes long enum tags and sequences' `length_width` are allowed TagNotPowerOfTwo(Declaration), /// Some of the declared types were lacking definition, which is considered /// a container's validation error diff --git a/docs/migration_guides/v0.9_to_v1.0.0_near_sdk_rs.md b/docs/migration_guides/v0.9_to_v1.0.0_near_sdk_rs.md index 6365c8c3a..b33a491f7 100644 --- a/docs/migration_guides/v0.9_to_v1.0.0_near_sdk_rs.md +++ b/docs/migration_guides/v0.9_to_v1.0.0_near_sdk_rs.md @@ -451,7 +451,7 @@ index 834fc98..7d1df75 100644 which would transform into following bound on trait's implementation: ```rust -// line with `T: core::default::Default,` dissappeared +// line with `T: core::default::Default,` disappeared impl borsh::de::BorshDeserialize for IndexMap where T: BorshSerialize,