Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/docs: improve wording and fix typos #5157

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/book/src/advanced/assembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn add_1(num: u32) -> u32 {
}
```

An `asm` block can only return a single register. If you really need to return more than one value, you can modify a tuple. Here's an example showing how can implement this `(u64, u64)`:
An `asm` block can only return a single register. If you really need to return more than one value, you can modify a tuple. Here's an example showing how you can implement this `(u64, u64)`:

```sway
{{#include ../../../../examples/asm_return_tuple_pointer/src/main.sw}}
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/testing/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn test_fail() {
> **Note:** When running `forc test`, your contract will be built twice: first *without* unit tests in order to determine the contract's ID, then a second time *with* unit tests with the `CONTRACT_ID` provided to their namespace. This `CONTRACT_ID` can be used with the `abi` cast to enable contract calls within unit tests.
<!-- contract_id:example:end -->

Unit tests can call methods of external contracts if those contracts are added as contract dependencies, i.e. in the the [`contract-dependencies`](../forc/manifest_reference.md#the-contract-dependencies-section) section of the manifest file. An example of such calls is shown below:
Unit tests can call methods of external contracts if those contracts are added as contract dependencies, i.e. in the [`contract-dependencies`](../forc/manifest_reference.md#the-contract-dependencies-section) section of the manifest file. An example of such calls is shown below:

```sway
{{#include ../../../../examples/multi_contract_calls/caller/src/main.sw:multi_contract_calls}}
Expand Down
2 changes: 1 addition & 1 deletion sway-core/src/asm_generation/evm/evm_asm_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<'ir, 'eng> EvmAsmBuilder<'ir, 'eng> {
self.setup_free_memory_pointer(&mut s);

if is_payable {
// Get the the amount of ETH transferred to the contract by the parent contract,
// Get the amount of ETH transferred to the contract by the parent contract,
// or by a transaction and check for a non-payable contract. Revert if caller
// sent ether.
//
Expand Down
2 changes: 1 addition & 1 deletion sway-core/src/language/ty/declaration/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ impl TyDecl {
}

/// friendly name string used for error reporting,
/// which consists of the the identifier for the declaration.
/// which consists of the identifier for the declaration.
pub fn friendly_name(&self, engines: &Engines) -> String {
let decl_engine = engines.de();
let type_engine = engines.te();
Expand Down
Loading