diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-17 22:40:12 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-19 18:02:45 +0100 |
| commit | a00e2b3f034cc8739eaa983977f5b63948feec07 (patch) | |
| tree | 8d59e2f78fc5943ab13a91f0ffe050e38fa99dad | |
| parent | 63a1373ac0bed85b06f4e6a425941f862f6dd178 (diff) | |
| download | sylt-a00e2b3f034cc8739eaa983977f5b63948feec07.tar.gz | |
change the error message a bit
| -rw-r--r-- | src/error.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs index 9d746fe..b42db3f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -109,8 +109,9 @@ impl fmt::Display for ErrorKind { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let prompt = "*****".red(); let message = match &self.message { - Some(s) => format!("\n{} {}", ">>>".red(), s), + Some(s) => format!("\n{} {}", prompt, s), None => String::from(""), }; @@ -122,7 +123,8 @@ impl fmt::Display for Error { String::new() }; - write!(f, "\n<{}> {}:{} {}{}{}\n", "ERR".red(), self.file.display().blue(), self.line.blue(), self.kind, message, line) + write!(f, "\n {} {}:{} \n{} {}{}{}\n", "ERR".red(), + self.file.display().blue(), self.line.blue(), prompt, self.kind, message, line) } } |
