From 1c72309677d9e5651f118101b9c55b168ea15b69 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 24 Mar 2024 20:12:04 +0100 Subject: [PATCH] fix(types/error): Add a pseudo error for infallible conversions --- trixy-types/src/error/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trixy-types/src/error/mod.rs b/trixy-types/src/error/mod.rs index 7d739ed..328eabd 100644 --- a/trixy-types/src/error/mod.rs +++ b/trixy-types/src/error/mod.rs @@ -19,7 +19,7 @@ * If not, see . */ -use std::ffi::c_char; +use std::{convert::Infallible, ffi::c_char}; use thiserror::Error; @@ -43,6 +43,6 @@ pub enum TypeConversionError { #[error("The returned Result was an error: {original_message}")] ResultWasErr { original_message: String }, - #[error("This funciton is not admissable")] - NotAdmissable, + #[error("This conversion was infallible, and will thus never fail")] + Infallible(#[from] Infallible), }