From 2b299d6c1c98f1227c2878383831a67a925ef142 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 28 Apr 2024 21:50:29 +0200 Subject: rebel-lang: typing: use write_str() to format constant strings --- crates/rebel-lang/src/typing.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/rebel-lang/src/typing.rs b/crates/rebel-lang/src/typing.rs index 1f176f1..7472968 100644 --- a/crates/rebel-lang/src/typing.rs +++ b/crates/rebel-lang/src/typing.rs @@ -324,11 +324,11 @@ impl Type { impl Display for Type { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Type::Free => write!(f, "_"), - Type::Unit => write!(f, "()"), - Type::Bool => write!(f, "bool"), - Type::Int => write!(f, "int"), - Type::Str => write!(f, "str"), + Type::Free => f.write_str("_"), + Type::Unit => f.write_str("()"), + Type::Bool => f.write_str("bool"), + Type::Int => f.write_str("int"), + Type::Str => f.write_str("str"), Type::Tuple(elems) => { let mut first = true; f.write_str("(")?; -- cgit v1.2.3