From 98001dd938b4fc176a7ce9b044415ca0b581cad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Wed, 17 Feb 2021 22:54:21 +0100 Subject: fix minor typos --- src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index b42db3f..b897c80 100644 --- a/src/error.rs +++ b/src/error.rs @@ -64,7 +64,7 @@ impl fmt::Display for ErrorKind { let given = b .iter() .fold(String::new(), |a, v| { format!("{}{:?}, ", a, v) }); - write!(f, "Argument types don't match, expected [{:?}] but got [{:?}]", + write!(f, "Argument types do not match, expected [{:?}] but got [{:?}]", expected, given) } ErrorKind::IndexOutOfBounds(value, len, slot) => { @@ -85,10 +85,10 @@ impl fmt::Display for ErrorKind { write!(f, "Assertion failed") } ErrorKind::SyntaxError(line, token) => { - write!(f, "{} on line {} at token {:?}", "Syntax Error".bold(), line, token) + write!(f, "Syntax Error on line {} at token {:?}", line, token) } ErrorKind::Unreachable => { - write!(f, "{}", "Unreachable".bold()) + write!(f, "Reached unreachable code.") } ErrorKind::InvalidProgram => { write!(f, "{}", "[!!] Invalid program [!!]".bold()) -- cgit v1.2.1