From b54f13d5976448f35fd4653e8d0f79528ae52521 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 9 Jan 2024 16:43:01 +0100 Subject: [PATCH] Make clippy happy --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 9e6b942f..cfecc78f 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -778,8 +778,8 @@ pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { } } (s, true) => { - if rv.is_some() { - rv.as_mut().unwrap().push_str(s); + if let Some(ref mut rv) = rv { + rv.push_str(s); } } }