From 86e38e4e4201d7ee1b1a6b6ca833c5e1b9b08645 Mon Sep 17 00:00:00 2001 From: behkod Date: Tue, 24 Oct 2023 18:49:43 +0330 Subject: [PATCH] replaced i32 by u32 to avoid conflicts in compiling In prev definition of the function it was accepting an i32 to be added by a u32 var which was causing compile error. --- .../tutorials/smart-contracts/use-maps-for-storing-values.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/md/en/docs/tutorials/smart-contracts/use-maps-for-storing-values.md b/content/md/en/docs/tutorials/smart-contracts/use-maps-for-storing-values.md index 24b50962f..7164c36a7 100644 --- a/content/md/en/docs/tutorials/smart-contracts/use-maps-for-storing-values.md +++ b/content/md/en/docs/tutorials/smart-contracts/use-maps-for-storing-values.md @@ -250,7 +250,7 @@ To add insert and remove functions to the contract: ```rust #[ink(message)] - pub fn inc_mine(&mut self, by: i32) { + pub fn inc_mine(&mut self, by: u32) { let caller = self.env().caller(); let my_value = self.get_mine(); self.my_map.insert(caller, &(my_value + by));