From c78c1dfc25a8bbc6a1ceffbce31f102e9afc8007 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 18 May 2022 13:36:16 +0200 Subject: Fix nightly clippy warning (#684) --- askama_shared/src/filters/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_shared/src') diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs index fd26dc1..6437ce0 100644 --- a/askama_shared/src/filters/mod.rs +++ b/askama_shared/src/filters/mod.rs @@ -5,7 +5,7 @@ //! For more information, read the [book](https://djc.github.io/askama/filters.html). #![allow(clippy::trivially_copy_pass_by_ref)] -use std::fmt; +use std::fmt::{self, Write}; #[cfg(feature = "serde_json")] mod json; @@ -313,7 +313,7 @@ where rv.push_str(separator); } - rv.push_str(&format!("{}", item)); + write!(rv, "{}", item)?; } Ok(rv) -- cgit