From 2de73f57fc9599602e001fc6331034749b2eacb0 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Mon, 17 Jun 2024 15:15:57 +0900 Subject: [PATCH] conflicts: remove redundant information from ReadFile error The ReadFile error message already says "when reading file content for file {path}..". --- lib/src/conflicts.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/src/conflicts.rs b/lib/src/conflicts.rs index 1c10f39b5f..f28e1c51de 100644 --- a/lib/src/conflicts.rs +++ b/lib/src/conflicts.rs @@ -92,11 +92,7 @@ async fn get_file_contents( .map_err(|err| BackendError::ReadFile { path: path.to_owned(), id: id.clone(), - source: format!( - "Failed to read file contents for {}: {err}", - path.as_internal_file_string() - ) - .into(), + source: err.into(), })?; Ok(ContentHunk(content)) }