From 60129b7d1c0ea8bdf2ec666fa51957e97465e88f Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 6 May 2019 23:17:26 +0200 Subject: Consolidate errors in the error module --- dhall/src/phase/binary.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'dhall/src/phase/binary.rs') 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; +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; pub fn decode(data: &[u8]) -> Result { match serde_cbor::de::from_slice(data) { -- cgit v1.2.3