fix(types/error): Add a pseudo error for infallible conversions

This commit is contained in:
Benedikt Peetz 2024-03-24 20:12:04 +01:00
parent 0ebbc4346e
commit 9e37456f74
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
* If not, see <https://www.gnu.org/licenses/>. * If not, see <https://www.gnu.org/licenses/>.
*/ */
use std::ffi::c_char; use std::{convert::Infallible, ffi::c_char};
use thiserror::Error; use thiserror::Error;
@ -43,6 +43,6 @@ pub enum TypeConversionError {
#[error("The returned Result was an error: {original_message}")] #[error("The returned Result was an error: {original_message}")]
ResultWasErr { original_message: String }, ResultWasErr { original_message: String },
#[error("This funciton is not admissable")] #[error("This conversion was infallible, and will thus never fail")]
NotAdmissable, Infallible(#[from] Infallible),
} }