Remove unnecessary String allocation
Remove unnecessary String allocation by passing &format! or &x.to_string as impl Into<String>
This commit is contained in:
parent
8a2a7f7e21
commit
0245f289b2
5 changed files with 10 additions and 10 deletions
|
|
@ -128,7 +128,7 @@ impl Counter {
|
|||
)
|
||||
.push(
|
||||
// We show the value of the counter here
|
||||
Text::new(&self.value.to_string()).size(50),
|
||||
Text::new(self.value.to_string()).size(50),
|
||||
)
|
||||
.push(
|
||||
// The decrement button. We tell it to produce a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue