From 3b220c64f615a4e18346e8a1c07ad7b1aae9fcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 6 Jun 2021 18:42:12 +0200 Subject: chore: upgrade crates (#10867) * deno_doc - 0.5.0 * deno_lint - 0.6.0 * dprint-plugin-typescript - 0.46.0 * dprint-plugin-markdown - 0.8.0 * dprint-plugin-json - 0.12.0 * swc_bundler - 0.37.4 * swc_ecmascript - 0.36.0 --- cli/tools/fmt.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cli/tools') diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 869403f07..ac9af0292 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -101,7 +101,7 @@ fn format_markdown( dprint_plugin_markdown::format_text( &file_text, &md_config, - Box::new(move |tag, text, line_width| { + move |tag, text, line_width| { let tag = tag.to_lowercase(); if matches!( tag.as_str(), @@ -140,8 +140,9 @@ fn format_markdown( } else { Ok(text.to_string()) } - }), + }, ) + .map_err(|e| e.to_string()) } /// Formats JSON and JSONC using the rules provided by .deno() @@ -150,6 +151,7 @@ fn format_markdown( fn format_json(file_text: &str) -> Result { let json_config = get_json_config(); dprint_plugin_json::format_text(&file_text, &json_config) + .map_err(|e| e.to_string()) } /// Formats a single TS, TSX, JS, JSX, JSONC, JSON, or MD file. @@ -165,6 +167,7 @@ pub fn format_file( format_json(&file_text) } else { dprint_plugin_typescript::format_text(&file_path, &file_text, &config) + .map_err(|e| e.to_string()) } } -- cgit v1.2.3