Diffstat (limited to 'src/build/builders/core/bool.rs')
-rw-r--r--src/build/builders/core/bool.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/build/builders/core/bool.rs b/src/build/builders/core/bool.rs
index 60170e5..efe7188 100644
--- a/src/build/builders/core/bool.rs
+++ b/src/build/builders/core/bool.rs
@@ -1,4 +1,4 @@
-use core::marker::PhantomData;
+use core::{fmt::Display, marker::PhantomData};
use crate::{
any::OwnedStatic,
@@ -11,7 +11,7 @@ use crate::{
Flow,
};
-impl<'ctx, M, E: Effect> crate::Build<'ctx, M, E> for bool {
+impl<'ctx, M: 'ctx, E: Effect> crate::Build<'ctx, M, E> for bool {
type Builder = Builder<E>;
}
@@ -20,6 +20,14 @@ pub enum Error {
Incomplete,
}
+impl Display for Error {
+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ match self {
+ Error::Incomplete => write!(f, "Incomplete"),
+ }
+ }
+}
+
pub struct Builder<E>(Option<bool>, PhantomData<fn() -> E>);
impl crate::BuilderTypes for bool {