From 3c790151edde7811f65e29a905ac92321f62f810 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 13 Jan 2025 09:33:31 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Andrew Thrasher --- wdl-format/tests/format.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wdl-format/tests/format.rs b/wdl-format/tests/format.rs index 423fba69..cbc0681f 100644 --- a/wdl-format/tests/format.rs +++ b/wdl-format/tests/format.rs @@ -134,7 +134,7 @@ fn prepare_document(source: &str, path: &Path) -> Result } /// Parses and formats source string -fn do_format(source: &str, path: &Path) -> Result { +fn format(source: &str, path: &Path) -> Result { let document = prepare_document(&source, &path)?; let formatted = match Formatter::default().format(&document) { Ok(formatted) => formatted, @@ -160,11 +160,11 @@ fn run_test(test: &Path, ntests: &AtomicUsize) -> Result<(), String> { ) })?; - let formatted = do_format(&source, path.as_path())?; + let formatted = format(&source, path.as_path())?; compare_result(formatted_path.as_path(), &formatted)?; - // test idepotency by formatting the formatted document - let twice_formatted = do_format(&formatted, formatted_path.as_path())?; + // test idempotency by formatting the formatted document + let twice_formatted = format(&formatted, formatted_path.as_path())?; compare_result(formatted_path.as_path(), &twice_formatted)?; ntests.fetch_add(1, Ordering::SeqCst);