1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::{
    effect::{Effect, ErasedEffective},
    Walk,
};

use super::value::ValueWalker;

impl<'ctx, M, E: Effect> Walk<'ctx, M, E> for bool {
    type Walker = ValueWalker<bool>;

    fn into_walker<'e>(self) -> ErasedEffective<'e, Self::Walker, E> {
        E::ready(ValueWalker::new(self))
    }
}

impl<'ctx, M, E: Effect> Walk<'ctx, M, E> for &'ctx bool {
    type Walker = ValueWalker<bool>;

    fn into_walker<'e>(self) -> ErasedEffective<'e, Self::Walker, E> {
        E::ready(ValueWalker::new(*self))
    }
}