summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2022-10-22 21:42:00 -0400
committerBotahamec <botahamec@outlook.com>2022-10-22 21:42:00 -0400
commitbe5c361bf817483467a14c4b907c90d10f512f56 (patch)
treea7f94d0b0d6e8431b1b5ef3918de8734f101bc9b /src/lib.rs
parent912b7aae3029dbf0364f951944ac4ecb1da83178 (diff)
Created UnexpectedError
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
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`]).
///