rust/hg-core/src/lib.rs
changeset 40933 18513d6ef7d4
parent 40271 dbc28c91f7ff
child 40959 d097dd0afc19
equal deleted inserted replaced
40932:dc38d976ff4d 40933:18513d6ef7d4
    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),