From 70100f6dc54b413775e7317d861291be56a1cc31 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 19 May 2024 15:01:19 +0100 Subject: [PATCH] refactor(git): reporitory errors don't leak implementation --- crates/git/src/repository/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/git/src/repository/mod.rs b/crates/git/src/repository/mod.rs index d6dc5ecd..4659d0df 100644 --- a/crates/git/src/repository/mod.rs +++ b/crates/git/src/repository/mod.rs @@ -67,23 +67,23 @@ pub enum Error { Wait(std::io::Error), Spawn(std::io::Error), Validation(String), - GixClone(Box), - GixOpen(Box), - GixFetch(Box), + Clone(String), + Open(String), + Fetch(String), } impl std::error::Error for Error {} impl From for Error { fn from(value: gix::clone::Error) -> Self { - Self::GixClone(Box::new(value)) + Self::Clone(value.to_string()) } } impl From for Error { fn from(value: gix::open::Error) -> Self { - Self::GixOpen(Box::new(value)) + Self::Open(value.to_string()) } } impl From for Error { fn from(value: gix::clone::fetch::Error) -> Self { - Self::GixFetch(Box::new(value)) + Self::Fetch(value.to_string()) } }