From 3bf690e758e7251b6f4f5a852d2fefca2270553c Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:47:32 +0200 Subject: [PATCH] docs: Fix typos --- MIGRATING.md | 4 ++-- README.md | 12 ++++++------ sylvia/src/utils.rs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MIGRATING.md b/MIGRATING.md index 8db5691e..f56f2087 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -19,7 +19,7 @@ error[E0308]: mismatched types found struct `InstantiateCtx<'_>` ``` -`InstantiateCtx` and `ExecCtx` could be previosly used interchangeably. They are currently separate +`InstantiateCtx` and `ExecCtx` could be previously used interchangeably. They are currently separate types. The same applies to `ReplyCtx`/`MigrateCtx` pair. ## 0.4.2 -> 0.5.0 @@ -39,4 +39,4 @@ error[E0308]: mismatched types +} ``` -`module` attr for macro contract should now point to your contract implemntation +`module` attr for macro contract should now point to your contract implementation diff --git a/README.md b/README.md index e6c5d74a..963706a4 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ but only one - the one with info about the trait being implemented. ## Macro attributes -`Sylvia` work with multiple attributes. I will explain here how and when to use which of them. +`Sylvia` works with multiple attributes. I will explain here how and when to use which of them. ```rust #[contract(module=contract_module::inner_module)] @@ -413,7 +413,7 @@ impl Interface for MyContract { } ``` -`module` is meant to be used when implementing interface on the contract. It's purpose +`module` is meant to be used when implementing interface on the contract. Its purpose is to inform `sylvia` where is the contract defined. If the contract is implemented in the same scope this attribute can and should be omitted. @@ -426,7 +426,7 @@ impl MyContract { } ``` -`error` is used by both `contract` and `entry_point` macros. It is neccessary in case a custom +`error` is used by both `contract` and `entry_point` macros. It is necessary in case a custom error is being used by your contract. If omitted generated code will use `StdError`. ```rust @@ -444,7 +444,7 @@ impl Interface for MyContract { ``` `messages` is the attribute for the `contract` macro. We can use it both when implementing contract -and when implementing an interface on a contract. It's purpose is to point sylvia to what interface +and when implementing an interface on a contract. Its purpose is to point sylvia to what interface is being implemented and how module in which it is defined is called. In case of the implementation of a trait it is only needed if the trait is defined in different @@ -710,7 +710,7 @@ impl Contract { ``` It is possible to override all message types like that. Next to the entry point path you will -also have to provide the type of your custom message. It is required to deserialize the messsage +also have to provide the type of your custom message. It is required to deserialize the message in the `multitest helpers`. ## Multitest @@ -826,7 +826,7 @@ is an error type of the contract. ## Interface items in multitest Because of implementation restrictions, calling methods from the contract interface -looks slightly different: +look slightly different: ```rust use contract::multitest_utils::Group; diff --git a/sylvia/src/utils.rs b/sylvia/src/utils.rs index b3f74b42..ea88c76f 100644 --- a/sylvia/src/utils.rs +++ b/sylvia/src/utils.rs @@ -30,7 +30,7 @@ pub const fn assert_no_intersection(msgs: [&[&str]; N]) { // Compare all elements at current indexes verify_no_collissions(&msgs, &states, &index); - // Increment index of alaphabeticaly first element + // Increment index of alphabetically first element states[index] = match states[index] { State::Ongoing(wi) => { if msgs[index].len() == wi + 1 { @@ -80,7 +80,7 @@ const fn get_next_alphabetical_index( } // Compare values at current indexes saved in states. -// All comparisions are made with value at index which point to alphabetically smallest +// All comparisons are made with value at index which point to alphabetically smallest // and values in each other arrays at their current position. // // Because arrays are sorted we don't have to compare each value with each other