fix: align to new folder structure (#72)
This commit is contained in:
parent
22a44a9767
commit
b111ea271a
|
@ -249,7 +249,7 @@ Let us briefly explain how we arrived at the `Game::MAXIMUM_SIZE`. Anchor uses t
|
|||
|
||||
In addition to the game's size, we have to add another 8 to the space. This is space for the internal discriminator which anchor sets automatically. In short, the discriminator is how anchor can differentiate between different accounts of the same program. For more information, check out the Anchor space reference.
|
||||
|
||||
> [Anchor Space Reference](./../chapter_5/space.md)
|
||||
> [Anchor Space Reference](./../anchor_references/space.md)
|
||||
|
||||
> (What about using `mem::size_of<Game>()`? This almost works but not quite. The issue is that borsh will always serialize an option as 1 byte for the variant identifier and then additional x bytes for the content if it's Some. Rust uses null-pointer optimization to make Option's variant identifier 0 bytes when it can, so an option is sometimes just as big as its contents. This is the case with `Sign`. This means the `MAXIMUM_SIZE` could also be expressed as `mem::size_of<Game>() + 9`.)
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ Error:
|
|||
/anchor/tests/unchecked/programs/unchecked/src/lib.rs:15:8
|
||||
Struct field "potentially_dangerous" is unsafe, but is not documented.
|
||||
Please add a `/// CHECK:` doc comment explaining why no checks through types are necessary.
|
||||
See https://book.anchor-lang.com/chapter_3/the_accounts_struct.html#safety-checks for more information.
|
||||
See https://book.anchor-lang.com/anchor_in_depth/the_accounts_struct.html#safety-checks for more information.
|
||||
```
|
||||
|
||||
To fix this, write a doc comment describing the potential security implications, e.g.:
|
||||
|
|
Loading…
Reference in New Issue