From d54e39dcf61936165220bdfe83b9f7c1a1150987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 14 Nov 2021 15:46:42 +0100 Subject: [PATCH] pkstrings: prefer String::from in example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- pkstrings/examples/strings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkstrings/examples/strings.rs b/pkstrings/examples/strings.rs index 2c67111..76b120d 100644 --- a/pkstrings/examples/strings.rs +++ b/pkstrings/examples/strings.rs @@ -41,7 +41,7 @@ fn read_data(data: Vec) { for (offset, ord) in data.iter().enumerate() { // Read current chr if let Ok(pkstr) = PKString::try_from(*ord) { - buffer.push(pkstr.into_string()); + buffer.push(String::from(pkstr)); } else { if buffer.len() >= 4 { print_buffer(offset, &buffer);