From d31926298520c781959720bcc297b469d47a8764 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Sat, 19 Jun 2021 08:07:59 -0600 Subject: [PATCH] Add conversion from Position to usize --- src/bridgetree.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bridgetree.rs b/src/bridgetree.rs index 75eb4ac..7a33bd6 100644 --- a/src/bridgetree.rs +++ b/src/bridgetree.rs @@ -78,6 +78,12 @@ impl Position { } } +impl From for usize { + fn from(p: Position) -> usize { + p.0 + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum Leaf { Left(A),