Add conversion from Position to usize

This commit is contained in:
Kris Nuttycombe 2021-06-19 08:07:59 -06:00
parent 205b075aa8
commit d319262985
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ impl Position {
}
}
impl From<Position> for usize {
fn from(p: Position) -> usize {
p.0
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Leaf<A> {
Left(A),