diff options
| author | Botahamec <botahamec@outlook.com> | 2022-10-22 21:42:00 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2022-10-22 21:42:00 -0400 |
| commit | be5c361bf817483467a14c4b907c90d10f512f56 (patch) | |
| tree | a7f94d0b0d6e8431b1b5ef3918de8734f101bc9b /src/lib.rs | |
| parent | 912b7aae3029dbf0364f951944ac4ecb1da83178 (diff) | |
Created UnexpectedError
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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`]). /// |
