summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-04-28 21:50:29 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-04-28 21:50:53 +0200
commit2b299d6c1c98f1227c2878383831a67a925ef142 (patch)
tree739bcb78803acb8ce2aef39c283583d1314f3029 /crates
parenta7224f85bef1aba5c04a91f0459f196eced261d2 (diff)
downloadrebel-2b299d6c1c98f1227c2878383831a67a925ef142.tar
rebel-2b299d6c1c98f1227c2878383831a67a925ef142.zip
rebel-lang: typing: use write_str() to format constant strings
Diffstat (limited to 'crates')
-rw-r--r--crates/rebel-lang/src/typing.rs10
1 files 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("(")?;