summaryrefslogtreecommitdiff
path: root/core/error.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-10-31 18:57:19 +0000
committerGitHub <noreply@github.com>2020-10-31 19:57:19 +0100
commit07d23baa742145639dd600fda97785ec4a8b9687 (patch)
treee39f381e4c7e1b0dd01a5bd8e1da4dabd2c894a1 /core/error.rs
parent03769f11b5db314c550478852317d9ea108c2f76 (diff)
fix(core/error): Remove extra newline from JsError::fmt() (#8145)
Diffstat (limited to 'core/error.rs')
-rw-r--r--core/error.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/error.rs b/core/error.rs
index 7f16af6c1..331feba20 100644
--- a/core/error.rs
+++ b/core/error.rs
@@ -364,11 +364,11 @@ impl Display for JsError {
if let Some(stack) = &self.stack {
let stack_lines = stack.lines();
if stack_lines.count() > 1 {
- return writeln!(f, "{}", stack);
+ return write!(f, "{}", stack);
}
}
- writeln!(f, "{}", self.message)?;
+ write!(f, "{}", self.message)?;
if let Some(script_resource_name) = &self.script_resource_name {
if self.line_number.is_some() && self.start_column.is_some() {
let source_loc = format_source_loc(
@@ -376,7 +376,7 @@ impl Display for JsError {
self.line_number.unwrap(),
self.start_column.unwrap(),
);
- writeln!(f, " at {}", source_loc)?;
+ write!(f, "\n at {}", source_loc)?;
}
}
Ok(())