summaryrefslogtreecommitdiff
path: root/runtime/fmt_errors.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /runtime/fmt_errors.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/fmt_errors.rs')
-rw-r--r--runtime/fmt_errors.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/fmt_errors.rs b/runtime/fmt_errors.rs
index e8c316290..62764965d 100644
--- a/runtime/fmt_errors.rs
+++ b/runtime/fmt_errors.rs
@@ -93,18 +93,18 @@ fn format_frame(frame: &JsStackFrame) -> String {
if let Some(function_name) = &frame.function_name {
if let Some(type_name) = &frame.type_name {
if !function_name.starts_with(type_name) {
- write!(formatted_method, "{}.", type_name).unwrap();
+ write!(formatted_method, "{type_name}.").unwrap();
}
}
formatted_method += function_name;
if let Some(method_name) = &frame.method_name {
if !function_name.ends_with(method_name) {
- write!(formatted_method, " [as {}]", method_name).unwrap();
+ write!(formatted_method, " [as {method_name}]").unwrap();
}
}
} else {
if let Some(type_name) = &frame.type_name {
- write!(formatted_method, "{}.", type_name).unwrap();
+ write!(formatted_method, "{type_name}.").unwrap();
}
if let Some(method_name) = &frame.method_name {
formatted_method += method_name
@@ -149,7 +149,7 @@ fn format_maybe_source_line(
return "".to_string();
}
if source_line.contains("Couldn't format source line: ") {
- return format!("\n{}", source_line);
+ return format!("\n{source_line}");
}
let mut s = String::new();
@@ -178,7 +178,7 @@ fn format_maybe_source_line(
let indent = format!("{:indent$}", "", indent = level);
- format!("\n{}{}\n{}{}", indent, source_line, indent, color_underline)
+ format!("\n{indent}{source_line}\n{indent}{color_underline}")
}
fn find_recursive_cause(js_error: &JsError) -> Option<ErrorReference> {
@@ -227,7 +227,7 @@ fn format_aggregated_error(
);
for line in error_string.trim_start_matches("Uncaught ").lines() {
- write!(s, "\n {}", line).unwrap();
+ write!(s, "\n {line}").unwrap();
}
}