From 58ea9f4d6614c4c74a10f97ae570f27af1ab4f43 Mon Sep 17 00:00:00 2001 From: Aswin Kumar <86375577+Ash20pk@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:04:11 +0800 Subject: [PATCH] Update 3. Jazzing With Type Abilities and Resources.md --- .../3. Jazzing With Type Abilities and Resources.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Start Building on Aptos/3. Structs and Resources in Move/3. Jazzing With Type Abilities and Resources.md b/Start Building on Aptos/3. Structs and Resources in Move/3. Jazzing With Type Abilities and Resources.md index a96c0a5c..5d7aa80b 100644 --- a/Start Building on Aptos/3. Structs and Resources in Move/3. Jazzing With Type Abilities and Resources.md +++ b/Start Building on Aptos/3. Structs and Resources in Move/3. Jazzing With Type Abilities and Resources.md @@ -253,20 +253,20 @@ Now, let’s move forward and add abilities to the `Calculator` struct that we d module metaschool::calculator { use std::signer; - // Rsource with key ability + // Resource with key ability struct Calculator has key { result: u64, } - // Function acquires the Calculator resource + // Function acquires the Calculator resource fun create_calculator(account: &signer) acquires Calculator { - // We check if the signer address already has a Calculator resource - // associated to it + // We check if the signer address already has a Calculator resource + // associated to it if (exists(signer::address_of(account))){ - // Here, we are using borrow_global_mut to fetch the Calculator resource - // associated with the signer address + // Here, we are using borrow_global_mut to fetch the Calculator resource + // associated with the signer address let calculator = borrow_global_mut(signer::address_of(account)); calculator.result = 0; }