From 36de9a902ebca597bf1272e3489410a79642eec3 Mon Sep 17 00:00:00 2001 From: Igor Braga Date: Wed, 15 Oct 2025 12:23:32 -0400 Subject: [PATCH] Fix rust contract template comment typos Signed-off-by: Igor Braga --- examples/test/src/lib.rs | 6 +++--- stylus-tools/src/templates/contract/src/lib.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/test/src/lib.rs b/examples/test/src/lib.rs index b4c95068..c861428e 100644 --- a/examples/test/src/lib.rs +++ b/examples/test/src/lib.rs @@ -58,7 +58,7 @@ impl Counter { new_value: self.number.get(), }); } - /// Sets a number in storage to a user-specified value. + /// Multiplies `number` by `new_number` and updates its value in storage. pub fn mul_number(&mut self, new_number: U256) { self.number.set(new_number * self.number.get()); let prev = self.number.get(); @@ -72,7 +72,7 @@ impl Counter { new_value: self.number.get(), }); } - /// Sets a number in storage to a user-specified value. + /// Increments `number` by `new_number` and updates its value in storage. pub fn add_number(&mut self, new_number: U256) { self.number.set(new_number + self.number.get()); let prev = self.number.get(); @@ -86,7 +86,7 @@ impl Counter { new_value: self.number.get(), }); } - /// Increments `number` and updates its value in storage. + /// Increments `number` by 1 and updates its value in storage. pub fn increment(&mut self) { // Increment the number in storage. let prev = self.number.get(); diff --git a/stylus-tools/src/templates/contract/src/lib.rs b/stylus-tools/src/templates/contract/src/lib.rs index c46b0828..e5e401f4 100644 --- a/stylus-tools/src/templates/contract/src/lib.rs +++ b/stylus-tools/src/templates/contract/src/lib.rs @@ -48,17 +48,17 @@ impl Counter { self.number.set(new_number); } - /// Sets a number in storage to a user-specified value. + /// Multiplies `number` by `new_number` and updates its value in storage. pub fn mul_number(&mut self, new_number: U256) { self.number.set(new_number * self.number.get()); } - /// Sets a number in storage to a user-specified value. + /// Increments `number` by `new_number` and updates its value in storage. pub fn add_number(&mut self, new_number: U256) { self.number.set(new_number + self.number.get()); } - /// Increments `number` and updates its value in storage. + /// Increments `number` by 1 and updates its value in storage. pub fn increment(&mut self) { let number = self.number.get(); self.set_number(number + U256::from(1));