From da81dfa07fae979d1fa3ddf7a5ed0262b52fa254 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 10 Jan 2023 19:54:48 +0100 Subject: [PATCH] Simplify char count --- src/std/string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std/string.md b/src/std/string.md index 3d19d446..252db373 100644 --- a/src/std/string.md +++ b/src/std/string.md @@ -15,7 +15,7 @@ fn main() { let s3 = String::from("🇨🇭"); println!("s3: len = {}, number of chars = {}", s3.len(), - s3.chars().collect::>().len()); + s3.chars().count()); } ```