From 7a01799f490739612be27725f1584a995f6b1491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=82=B3=E6=9D=83?= <695601626@qq.com> Date: Fri, 6 Oct 2023 02:49:09 +0800 Subject: chore: update to Rust 1.73 (#20781) --- cli/errors.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli/errors.rs') diff --git a/cli/errors.rs b/cli/errors.rs index 4ea0e000a..f867ebbcc 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -15,6 +15,7 @@ use deno_graph::ModuleError; use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; use import_map::ImportMapError; +use std::fmt::Write; fn get_import_map_error_class(_: &ImportMapError) -> &'static str { "URIError" @@ -70,7 +71,10 @@ pub fn get_error_class_name(e: &AnyError) -> &'static str { log::warn!( "Error '{}' contains boxed error of unknown type:{}", e, - e.chain().map(|e| format!("\n {e:?}")).collect::() + e.chain().fold(String::new(), |mut output, e| { + let _ = write!(output, "\n {e:?}"); + output + }) ); } "Error" -- cgit v1.2.3