Skip to content

Commit ad00304

Browse files
authored
docs: make doc comments more terse & accurate (#120)
GuessTheNumber contract doc comments had some issues
1 parent 8a7dccc commit ad00304

File tree

1 file changed

+3
-3
lines changed
  • contracts/guess-the-number/src

1 file changed

+3
-3
lines changed

contracts/guess-the-number/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ impl GuessTheNumber {
9292
unsafe { env.storage().instance().get(THE_NUMBER).unwrap_unchecked() }
9393
}
9494

95-
/// readonly function to get the current admin
95+
/// Get current admin
9696
pub fn admin(env: &Env) -> Option<Address> {
9797
env.storage().instance().get(ADMIN_KEY)
9898
}
9999

100-
/// Set a new admin address. This is only callable by the admin.
100+
/// Set a new admin. Only callable by admin.
101101
pub fn set_admin(env: &Env, admin: Address) {
102102
// Check if admin is already set
103103
if env.storage().instance().has(ADMIN_KEY) {
@@ -106,7 +106,7 @@ impl GuessTheNumber {
106106
env.storage().instance().set(ADMIN_KEY, &admin);
107107
}
108108

109-
// Private helper function to require auth from the admin
109+
/// Private helper function to require auth from the admin
110110
fn require_admin(env: &Env) {
111111
let admin = Self::admin(env).expect("admin not set");
112112
admin.require_auth();

0 commit comments

Comments
 (0)