From 2384c24f523edad42c97d96c6bb00c1013353144 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Sat, 12 Nov 2022 12:33:17 -0600 Subject: refactor: change error to use Display instead of Debug --- src/error.rs | 8 ++++---- src/finder/error.rs | 2 +- src/paths/error.rs | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/error.rs b/src/error.rs index efd7193..9e20809 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,15 +2,15 @@ pub type Result = std::result::Result; #[derive(thiserror::Error, Debug)] pub enum Error { - #[error("IO error: {0:?}")] + #[error("IO error: {0}")] IO(#[from] std::io::Error), - #[error("Config error: {0:?}")] + #[error("Config error: {0}")] Config(#[from] figment::error::Error), - #[error("Directories error: {0:?}")] + #[error("Directories error: {0}")] Directories(#[from] crate::paths::Error), - #[error("Finder error: {0:?}")] + #[error("Finder error: {0}")] Finder(#[from] crate::finder::Error), } diff --git a/src/finder/error.rs b/src/finder/error.rs index 181da21..6ea5017 100644 --- a/src/finder/error.rs +++ b/src/finder/error.rs @@ -2,7 +2,7 @@ pub type Result = std::result::Result; #[derive(thiserror::Error, Debug)] pub enum Error { - #[error("IO error: {0:?}")] + #[error("IO error: {0}")] IO(#[from] std::io::Error), #[error("Stdin error: Failed to get finder's stdin")] diff --git a/src/paths/error.rs b/src/paths/error.rs index 13a69ea..08fdc89 100644 --- a/src/paths/error.rs +++ b/src/paths/error.rs @@ -1,8 +1,5 @@ #[derive(thiserror::Error, Debug)] pub enum Error { - #[error("Ignore error: {0:?}")] + #[error("Ignore error: {0}")] Ignore(#[from] ignore::Error), - - #[error("Path contains invalid unicode: {0:?}")] - Unicode(String), } -- cgit v1.2.3-70-g09d2