From b992f4828b9d3c166c5e4122a364af47383afe50 Mon Sep 17 00:00:00 2001 From: Tom Linton Date: Mon, 21 Feb 2022 15:04:02 +1300 Subject: [PATCH] Replace SAFETY with CHECK (#11) --- src/chapter_3/the_accounts_struct.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chapter_3/the_accounts_struct.md b/src/chapter_3/the_accounts_struct.md index e0a9d08..0aab020 100644 --- a/src/chapter_3/the_accounts_struct.md +++ b/src/chapter_3/the_accounts_struct.md @@ -147,7 +147,7 @@ will result in an error similar to the following: Error: /anchor/tests/unchecked/programs/unchecked/src/lib.rs:15:8 Struct field "potentially_dangerous" is unsafe, but is not documented. - Please add a `/// SAFETY:` doc comment explaining why no checks through types are necessary. + 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. ``` @@ -156,7 +156,7 @@ To fix this, write a doc comment describing the potential security implications, ```rust,ignore #[derive(Accounts)] pub struct Initialize<'info> { - /// SAFETY: This is not dangerous because we don't read or write from this account + /// CHECK: This is not dangerous because we don't read or write from this account pub potentially_dangerous: UncheckedAccount<'info> } ```