Skip to content

Commit 86e38e4

Browse files
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.
1 parent 2b6797b commit 86e38e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/md/en/docs/tutorials/smart-contracts/use-maps-for-storing-values.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ To add insert and remove functions to the contract:
250250

251251
```rust
252252
#[ink(message)]
253-
pub fn inc_mine(&mut self, by: i32) {
253+
pub fn inc_mine(&mut self, by: u32) {
254254
let caller = self.env().caller();
255255
let my_value = self.get_mine();
256256
self.my_map.insert(caller, &(my_value + by));

0 commit comments

Comments
 (0)