From 859d4bc8259bc04f9e946a4486258b799b9680c2 Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Wed, 25 Jan 2017 17:55:53 -0800 Subject: [PATCH] Add a little From helper for edn::parse::ParseError. Not used yet. --- query-parser/src/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/query-parser/src/error.rs b/query-parser/src/error.rs index 6704e0d4..8e264e96 100644 --- a/query-parser/src/error.rs +++ b/query-parser/src/error.rs @@ -30,6 +30,12 @@ pub enum QueryParseError { FindParseError(FindParseError), } +impl From for QueryParseError { + fn from(err: edn::parse::ParseError) -> QueryParseError { + QueryParseError::EdnParseError(err) + } +} + pub type FindParseResult = Result; pub type QueryParseResult = Result;