equal
deleted
inserted
replaced
13 |
13 |
14 pub const NULL_REVISION: Revision = -1; |
14 pub const NULL_REVISION: Revision = -1; |
15 |
15 |
16 /// The simplest expression of what we need of Mercurial DAGs. |
16 /// The simplest expression of what we need of Mercurial DAGs. |
17 pub trait Graph { |
17 pub trait Graph { |
18 fn parents(&self, Revision) -> Result<(Revision, Revision), GraphError>; |
18 fn parents(&self, Revision) -> Result<[Revision; 2], GraphError>; |
19 } |
19 } |
20 |
20 |
21 #[derive(Clone, Debug, PartialEq)] |
21 #[derive(Clone, Debug, PartialEq)] |
22 pub enum GraphError { |
22 pub enum GraphError { |
23 ParentOutOfRange(Revision), |
23 ParentOutOfRange(Revision), |