diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-28 21:50:29 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-28 21:50:53 +0200 |
commit | 2b299d6c1c98f1227c2878383831a67a925ef142 (patch) | |
tree | 739bcb78803acb8ce2aef39c283583d1314f3029 /crates | |
parent | a7224f85bef1aba5c04a91f0459f196eced261d2 (diff) | |
download | rebel-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.rs | 10 |
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("(")?; |