@@ -18,48 +18,6 @@ use std::marker::PhantomData;
1818
1919use super :: sandbox:: Sandbox ;
2020
21- /// TODO: fix this comment, it is not accurate anymore.
22- ///
23- /// Metadata about an evolution. Any `Sandbox` implementation
24- /// that also implements `EvolvableSandbox` can decide the following
25- /// things in a type-safe way:
26- ///
27- /// 1. That transition is possible
28- /// 2. That transition requires a specific kind of metadata
29- ///
30- /// For example, if you have the following structs:
31- ///
32- /// ```ignore
33- /// struct MySandbox1 {}
34- /// struct MySandbox2 {}
35- ///
36- /// impl Sandbox for MySandbox1 {...}
37- /// impl Sandbox for MySandbox2 {...}
38- /// ```
39- ///
40- /// ...then you can define a metadata-free evolve transition between
41- /// `MySandbox1` and `MySandbox2` as follows:
42- ///
43- /// ```ignore
44- /// impl EvolvableSandbox<
45- /// MySandbox1,
46- /// MySandbox2,
47- /// Noop<MySandbox1, MySandbox2>
48- /// > for MySandbox1 {
49- /// fn evolve(
50- /// self,
51- /// _: Noop<MySandbox1, MySandbox2>
52- /// ) -> Result<MySandbox2> {
53- /// Ok(MySandbox2{})
54- /// }
55- /// }
56- ///
57- /// ```
58- ///
59- /// Most transitions will likely involve `Noop`, but some may involve
60- /// implementing their own.
61- pub trait TransitionMetadata < Cur : Sandbox , Next : Sandbox > { }
62-
6321/// Transition metadata that contains and does nothing. `Noop` is a
6422/// placeholder when you want to implement an `EvolvableSandbox`
6523/// that needs no additional metadata to succeed.
@@ -78,5 +36,3 @@ impl<Cur: Sandbox, Next: Sandbox> Default for Noop<Cur, Next> {
7836 }
7937 }
8038}
81-
82- impl < Cur : Sandbox , Next : Sandbox > TransitionMetadata < Cur , Next > for Noop < Cur , Next > { }
0 commit comments