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 f0f78f7fc7
commit 1c72309677
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/>.
*/
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),
}