From a699a3ec1d05a699a80eb4cac7053587c08ff76b Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 13 Nov 2019 23:02:15 +0100 Subject: [PATCH] Use write! more --- src/types.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types.rs b/src/types.rs index cf937b94ff..a8e83dd8ac 100644 --- a/src/types.rs +++ b/src/types.rs @@ -50,7 +50,7 @@ impl fmt::Debug for Type { arg.fmt(f)?; } - " -> ".fmt(f)?; + write!(f, " -> ")?; ret.fmt(f) } @@ -61,7 +61,7 @@ impl fmt::Debug for Type { name, args, } => { - write!(f, "{}", "(")?; + write!(f, "(")?; if !module_name.is_empty() { write!(f, "{}.", module_name)?; @@ -73,14 +73,14 @@ impl fmt::Debug for Type { write!(f, " {:?}", arg)?; } - write!(f, "{}", ")") + write!(f, ")") } Type::Erroneous(problem) => { - "Erroneous(".fmt(f)?; + write!(f, "Erroneous(")?; problem.fmt(f)?; - ")".fmt(f) + write!(f, ")") } } }