From be5c361bf817483467a14c4b907c90d10f512f56 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Sat, 22 Oct 2022 21:42:00 -0400 Subject: Created UnexpectedError --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index dcd75dd..111b343 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,14 +1,23 @@ #![cfg_attr(not(feature = "std"), no_std)] #![warn(clippy::nursery)] #![warn(clippy::pedantic)] +#![allow(clippy::module_name_repetitions)] + +#[cfg(all(feature = "alloc", not(feature = "std")))] +extern crate alloc; use core::fmt::{self, Debug, Display}; #[cfg(feature = "std")] use std::error::Error; +#[cfg(feature = "alloc")] +pub use unexpected::UnexpectedError; pub use Expect::{Expected, Unexpected}; +#[cfg(feature = "alloc")] +mod unexpected; + /// `Expect` is a type that represents either the expected error type /// ([`Expected`]) or an unexpected error ([`Unexpected`]). /// -- cgit v1.2.3