From 32cb5df264cee5db49e96f9abff806e22d015f21 Mon Sep 17 00:00:00 2001 From: Gavrilikhin Daniil Date: Sat, 30 Sep 2023 08:48:50 +0800 Subject: [PATCH] Derive `thiserror::Error` --- src/support/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/support/mod.rs b/src/support/mod.rs index fe6dddd1eb3..5de1d4a8e79 100644 --- a/src/support/mod.rs +++ b/src/support/mod.rs @@ -155,11 +155,13 @@ pub fn load_library_permanently(filename: &str) -> bool { } /// Possible errors that can occur when loading a library -#[derive(Debug, PartialEq, Eq, Clone, Copy)] +#[derive(thiserror::Error, Debug, PartialEq, Eq, Clone, Copy)] pub enum LoadLibraryError { /// The given path could not be converted to a [`&str`] + #[error("The given path could not be converted to a `&str`")] UnicodeError, /// The given path could not be loaded as a library + #[error("The given path could not be loaded as a library")] LoadingError, }