From 0245f289b201c8b352dcffcd35e0f0d283085ee2 Mon Sep 17 00:00:00 2001 From: "Ram.Type-0" Date: Mon, 1 Nov 2021 23:41:16 +0900 Subject: Remove unnecessary String allocation Remove unnecessary String allocation by passing &format! or &x.to_string as impl Into --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 935c1a48..d39cc185 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit