diff options
author | Nadrieril | 2019-05-06 23:17:26 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-06 23:20:47 +0200 |
commit | 60129b7d1c0ea8bdf2ec666fa51957e97465e88f (patch) | |
tree | 2118155537989a1a3bfa6c51b5c476651a0ef93e /dhall/src/phase/binary.rs | |
parent | 423fdeebe9247b16744fae4b50df415bbd08be04 (diff) |
Consolidate errors in the error module
Diffstat (limited to 'dhall/src/phase/binary.rs')
-rw-r--r-- | dhall/src/phase/binary.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/dhall/src/phase/binary.rs b/dhall/src/phase/binary.rs index 9c31d4c..30aa7a0 100644 --- a/dhall/src/phase/binary.rs +++ b/dhall/src/phase/binary.rs @@ -1,14 +1,15 @@ -use dhall_syntax::*; -use itertools::*; +use itertools::Itertools; use serde_cbor::value::value as cbor; -type ParsedExpr = SubExpr<X, Import>; +use dhall_syntax::{ + rc, ExprF, FilePrefix, Hash, Import, ImportHashed, ImportLocation, + ImportMode, Integer, InterpolatedText, Label, Natural, Scheme, SubExpr, + URL, V, X, +}; -#[derive(Debug)] -pub enum DecodeError { - CBORError(serde_cbor::error::Error), - WrongFormatError(String), -} +use crate::error::DecodeError; + +type ParsedExpr = SubExpr<X, Import>; pub fn decode(data: &[u8]) -> Result<ParsedExpr, DecodeError> { match serde_cbor::de::from_slice(data) { |