Skip to content

Commit

Permalink
Derive thiserror::Error
Browse files Browse the repository at this point in the history
  • Loading branch information
gavrilikhin-d committed Sep 30, 2023
1 parent 5d33d8e commit 32cb5df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit 32cb5df

Please sign in to comment.