From b571c8a29c52edadc50803eeceb6fc41be870e81 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Thu, 12 Jan 2017 08:37:03 -0500 Subject: [PATCH] Import errors in tests --- src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 84912a5..75b6e41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -67,7 +67,8 @@ pub fn decode_varint(bytes: &[u8]) -> Result, Error> { mod tests { use futures::future::{ok, Future}; - use super::{decode_varint, Error}; + use super::{decode_varint}; + use super::Error::{CorruptVarint}; use super::Varint::{Unknown, Value}; #[test] @@ -82,8 +83,8 @@ mod tests { #[test] fn fail_corrupted_varints() { - assert_eq!(decode_varint(&[0]), Err(Error::CorruptVarint)); - assert_eq!(decode_varint(&[0, 0, 0]), Err(Error::CorruptVarint)); + assert_eq!(decode_varint(&[0]), Err(CorruptVarint)); + assert_eq!(decode_varint(&[0, 0, 0]), Err(CorruptVarint)); } #[test]