From 434d109d9cd13741baa4a8560252e22620db6818 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Mon, 8 Jan 2024 08:21:44 -0800 Subject: [PATCH] Make utf8chars.chars iter return `impl Iterator + fmt::Debug`. PiperOrigin-RevId: 596599987 --- rust/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/string.rs b/rust/string.rs index dfaa51918f..d2b5a5d6e3 100644 --- a/rust/string.rs +++ b/rust/string.rs @@ -344,7 +344,7 @@ impl ProtoStr { /// [`U+FFFD REPLACEMENT CHARACTER`]. /// /// [`U+FFFD REPLACEMENT CHARACTER`]: std::char::REPLACEMENT_CHARACTER - pub fn chars(&self) -> impl Iterator + '_ { + pub fn chars(&self) -> impl Iterator + '_ + fmt::Debug { Utf8Chunks::new(self.as_bytes()).flat_map(|chunk| { let mut yield_replacement_char = !chunk.invalid().is_empty(); chunk.valid().chars().chain(iter::from_fn(move || {