From 761cceb3f9034ed252d8551d739b2276e258df07 Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Tue, 12 Nov 2024 11:02:29 +0800 Subject: [PATCH 1/5] fix typo --- packages/samples/sources/move-basics/expression.move | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/samples/sources/move-basics/expression.move b/packages/samples/sources/move-basics/expression.move index c5cd9272..a770397d 100644 --- a/packages/samples/sources/move-basics/expression.move +++ b/packages/samples/sources/move-basics/expression.move @@ -16,8 +16,8 @@ let a; let b = true; // true is a literal let n = 1000; // 1000 is a literal let h = 0x0A; // 0x0A is a literal -let v = b"hello"; // b'hello' is a byte vector literal -let x = x"0A"; // x'0A' is a byte vector literal +let v = b"hello"; // b"hello" is a byte vector literal +let x = x"0A"; // x"0A" is a byte vector literal let c = vector[1, 2, 3]; // vector[] is a vector literal // ANCHOR_END: literals From 527e741ac0c4873e3d6f33668cfa5d4da9206b4d Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Tue, 12 Nov 2024 11:13:45 +0800 Subject: [PATCH 2/5] fix links --- book/src/move-basics/abilities-introduction.md | 4 ++-- book/src/move-basics/copy-ability.md | 2 +- book/src/move-basics/drop-ability.md | 4 ++-- book/src/storage/key-ability.md | 2 +- book/src/storage/store-ability.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/src/move-basics/abilities-introduction.md b/book/src/move-basics/abilities-introduction.md index 5c84cdbf..a7b4cc69 100644 --- a/book/src/move-basics/abilities-introduction.md +++ b/book/src/move-basics/abilities-introduction.md @@ -54,8 +54,8 @@ A struct without abilities cannot be discarded, or copied, or stored in the stor struct a _Hot Potato_. It is a joke, but it is also a good way to remember that a struct without abilities is like a hot potato - it can only be passed around and requires special handling. Hot Potato is one of the most powerful patterns in Move, we go in detail about it in the -[Hot Potato](./../programmability/hot-potato.md) chapter. +[Hot Potato](./../programmability/hot-potato-pattern.md) chapter. ## Further reading -- [Type Abilities](/reference/type-abilities.html) in the Move Reference. +- [Type Abilities](/reference/abilities.html) in the Move Reference. diff --git a/book/src/move-basics/copy-ability.md b/book/src/move-basics/copy-ability.md index 9074f73a..b9f25fe5 100644 --- a/book/src/move-basics/copy-ability.md +++ b/book/src/move-basics/copy-ability.md @@ -54,4 +54,4 @@ All of the types defined in the standard library have the `copy` ability as well ## Further reading -- [Type Abilities](/reference/type-abilities.html) in the Move Reference. +- [Type Abilities](/reference/abilities.html) in the Move Reference. diff --git a/book/src/move-basics/drop-ability.md b/book/src/move-basics/drop-ability.md index ffe9f9c9..1ac0595b 100644 --- a/book/src/move-basics/drop-ability.md +++ b/book/src/move-basics/drop-ability.md @@ -56,7 +56,7 @@ properly handled and not ignored. A struct with a single `drop` ability is called a _Witness_. We explain the concept of a _Witness_ in the -[Witness and Abstract Implementation](./../programmability/witness-and-abstract-implementation.md) +[Witness and Abstract Implementation](./../programmability/witness-pattern.md) section. ## Types with the `drop` Ability @@ -76,4 +76,4 @@ All of the types defined in the standard library have the `drop` ability as well ## Further reading -- [Type Abilities](/reference/type-abilities.html) in the Move Reference. +- [Type Abilities](/reference/abilities.html) in the Move Reference. diff --git a/book/src/storage/key-ability.md b/book/src/storage/key-ability.md index 3d1b0ea4..e8e707bb 100644 --- a/book/src/storage/key-ability.md +++ b/book/src/storage/key-ability.md @@ -59,4 +59,4 @@ we present the `sui::transfer` module, which provides native storage functions f ## Further reading -- [Type Abilities](/reference/type-abilities.html) in the Move Reference. +- [Type Abilities](/reference/abilities.html) in the Move Reference. diff --git a/book/src/storage/store-ability.md b/book/src/storage/store-ability.md index f4b0fdea..0d85bd9d 100644 --- a/book/src/storage/store-ability.md +++ b/book/src/storage/store-ability.md @@ -52,4 +52,4 @@ All of the types defined in the standard library have the `store` ability as wel ## Further reading -- [Type Abilities](/reference/type-abilities.html) in the Move Reference. +z- [Type Abilities](/reference/abilities.html) in the Move Reference. From ede526bfe62c50c6f1cb41b24d7d3c207a538c57 Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Wed, 13 Nov 2024 10:48:48 +0800 Subject: [PATCH 3/5] fix links and typo of Standard Library --- book/src/move-basics/standard-library.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/src/move-basics/standard-library.md b/book/src/move-basics/standard-library.md index 21beb4a3..d7ad52b6 100644 --- a/book/src/move-basics/standard-library.md +++ b/book/src/move-basics/standard-library.md @@ -22,11 +22,11 @@ and which module implements it. | [std::ascii](https://docs.sui.io/references/framework/move-stdlib/ascii) | Provides basic ASCII operations | [String](./string.md) | | [std::option](https://docs.sui.io/references/framework/move-stdlib/option) | Implements an `Option` | [Option](./option.md) | | [std::vector](https://docs.sui.io/references/framework/move-stdlib/vector) | Native operations on the vector type | [Vector](./vector.md) | -| [std::bcs](https://docs.sui.io/references/framework/move-stdlib/bcs) | Contains the `bcs::to_bytes()` function | [BCS](../move-basics/bcs.md) | +| [std::bcs](https://docs.sui.io/references/framework/move-stdlib/bcs) | Contains the `bcs::to_bytes()` function | [BCS](../programmability/bcs.md) | | [std::address](https://docs.sui.io/references/framework/move-stdlib/address) | Contains a single `address::length` function | [Address](./address.md) | | [std::type_name](https://docs.sui.io/references/framework/move-stdlib/type_name) | Allows runtime _type reflection_ | [Type Reflection](./type-reflection.md) | | std::hash | Hashing functions: `sha2_256` and `sha3_256` | [Cryptography and Hashing](../programmability/cryptography-and-hashing.md) | -| std::debug | Contains debugging functions, which are available in only in **test** mode | [Debugging](./debugging.md) | +| std::debug | Contains debugging functions, which are available in only in **test** mode | [Debugging](./guides/debugging.md) | | std::bit_vector | Provides operations on bit vectors | - | | std::fixed_point32 | Provides the `FixedPoint32` type | - | @@ -47,8 +47,8 @@ not be imported directly, but their functions are available on every integer val | Module | Description | | ---------------------------------------------------------------------- | ----------------------------- | | [std::u8](https://docs.sui.io/references/framework/move-stdlib/u8) | Functions for the `u8` type | -| [std::16](https://docs.sui.io/references/framework/move-stdlib/u64) | Functions for the `u16` type | -| [std::u32](https://docs.sui.io/references/framework/move-stdlib/u64) | Functions for the `u32` type | +| [std::u16](https://docs.sui.io/references/framework/move-stdlib/u16) | Functions for the `u16` type | +| [std::u32](https://docs.sui.io/references/framework/move-stdlib/u32) | Functions for the `u32` type | | [std::u64](https://docs.sui.io/references/framework/move-stdlib/u64) | Functions for the `u64` type | | [std::u128](https://docs.sui.io/references/framework/move-stdlib/u128) | Functions for the `u128` type | | [std::u256](https://docs.sui.io/references/framework/move-stdlib/u256) | Functions for the `u256` type | From 41a80be6ba5e9723a0e1a5d338f83219ef91e44f Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Wed, 13 Nov 2024 17:52:35 +0800 Subject: [PATCH 4/5] fix links of control flow --- book/src/move-basics/control-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/move-basics/control-flow.md b/book/src/move-basics/control-flow.md index 627a6b43..4ddd3af7 100644 --- a/book/src/move-basics/control-flow.md +++ b/book/src/move-basics/control-flow.md @@ -27,7 +27,7 @@ control flow statements (explained in detail below): code - [`loop` and `while` loops](#repeating-statements-with-loops) - repeating a block of code - [`break` and `continue` statements](#exiting-a-loop-early) - exiting a loop early -- [`return`](#return) statement - exiting a function early +- [`return`](#early-return) statement - exiting a function early ## Conditional Statements From d547a32b794f03f6161e787d2b17be1f90c0a16e Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Thu, 14 Nov 2024 10:42:24 +0800 Subject: [PATCH 5/5] fix link for coding conventions --- book/src/move-basics/module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/move-basics/module.md b/book/src/move-basics/module.md index e9bd0f19..45b0f537 100644 --- a/book/src/move-basics/module.md +++ b/book/src/move-basics/module.md @@ -25,7 +25,7 @@ with underscores between words. Modules names must be unique in the package. Usually, a single file in the `sources/` folder contains a single module. The file name should match the module name - for example, a `donut_shop` module should be stored in the `donut_shop.move` file. You can read more about coding conventions in the -[Coding Conventions](../special-topics/coding-conventions.md) section. +[Coding Conventions](../guides/coding-conventions.md) section. > If you need to declare more than one module in a file, you must use [Module Block](#module-block).