Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

docs: fix typos #1081

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 GRAVEYARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Bring back support for native structs in the VM. They can use a simple uniform r
## Signer relaxation for `move_to`

### Decision
Tables and framework-specific workarounds like `ResourceAccount` make this unneccessary.
Tables and framework-specific workarounds like `ResourceAccount` make this unnecessary.

### Rationale
In some usage scenarios of Move, it does not make sense to only allow move_to<R>(s, x) with s a signer. For instance, when Move is running on the EVM, storage is not owned and paid for by the account owner, but by the contract caller, which manages the accounts on behalf of owners. In general, the signer requirement allows one to only create new resources at addresses for which the transaction has a signer, which disables the capability to manage resource collections on behalf of others.
Expand Down
2 changes: 1 addition & 1 deletion docker/ci/github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN [ -x "$(set -x; command -v rustup)" ] \
&& [ -x "$(set -x; command -v npm)" ]

# should be a no-op
# sccache builds fine, but is not executable ??? in alpine, ends up being recompiled. Wierd.
# sccache builds fine, but is not executable ??? in alpine, ends up being recompiled. Weird.
RUN /move/scripts/dev_setup.sh -t -y -d -b -p

FROM setup_ci as build_environment
2 changes: 1 addition & 1 deletion language/documentation/book/src/standard-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ The system is in a state where the performed operation is not allowed.
```

---------------------------------------------------------------------------
A specific account address was required to perform an operation, but a different address from what was expected was encounterd.
A specific account address was required to perform an operation, but a different address from what was expected was encountered.

```move
const REQUIRES_ADDRESS: u8 = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ The system is in a state where the performed operation is not allowed.
```

---------------------------------------------------------------------------
A specific account address was required to perform an operation, but a different address from what was expected was encounterd.
A specific account address was required to perform an operation, but a different address from what was expected was encountered.

执行操作需要一个特定的帐户地址,但遇到的地址与预期的不同。

Expand Down
6 changes: 3 additions & 3 deletions language/documentation/coding_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ impl Foo {

As every integer operation (`+`, `-`, `/`, `*`, etc.) implies edge-cases (e.g. overflows `u64::MAX + 1`, underflows `0u64 -1`, division by zero, etc.),
we use checked arithmetic instead of directly using math symbols.
It forces us to think of edge-cases, and handle them explicitely.
It forces us to think of edge-cases, and handle them explicitly.
This is a brief and simplified mini guide of the different functions that exist to handle integer arithmetic:

* [checked_](https://doc.rust-lang.org/std/primitive.u32.html#method.checked_add): use this function if you want to handle overflows and underflows as a special edge-case. It returns `None` if an underflow or overflow has happened, and `Some(operation_result)` otherwise.
* [overflowing_](https://doc.rust-lang.org/std/primitive.u32.html#method.overflowing_add): use this function if you want the result of an overflow to potentially wrap around (e.g. `u64::MAX.overflow_add(10) == (9, true)`). It returns the underflowed or overflowed result as well as a flag indicating if an overflow has occured or not.
* [overflowing_](https://doc.rust-lang.org/std/primitive.u32.html#method.overflowing_add): use this function if you want the result of an overflow to potentially wrap around (e.g. `u64::MAX.overflow_add(10) == (9, true)`). It returns the underflowed or overflowed result as well as a flag indicating if an overflow has occurred or not.
* [wrapping_](https://doc.rust-lang.org/std/primitive.u32.html#method.wrapping_add): this is similar to overflowing operations, except that it returns the result directly. Use this function if you are sure that you want to handle underflows and overflows by wrapping around.
* [saturating_](https://doc.rust-lang.org/std/primitive.u32.html#method.saturating_add): if an overflow occurs, the result is kept within the boundary of the type (e.g. `u64::MAX.saturating_add(1) == u64::MAX`).

Expand Down Expand Up @@ -306,7 +306,7 @@ For the sake of example, we'll consider you are defining a test-only helper func
3. (optional) Use `cfg_attr` to make test-only trait derivations conditional:
```rust
#[cfg_attr(any(test, feature = "testing"), derive(FooTrait))]
#[derive(Debug, Display, ...)] // inconditional derivations
#[derive(Debug, Display, ...)] // unconditional derivations
struct Foo { ... }
```
4. (optional) Set up feature transitivity for crates that call crates that have test-only members. Let's say it's the case of `bar_crate`, which, through its test helpers, calls into `foo_crate` to use your test-only `foo`. Here's how you would set up `bar_crate/Cargo.toml`:
Expand Down