From a4db001a6a621240210dcbdf0b0aedf9de6af8ac Mon Sep 17 00:00:00 2001 From: debris Date: Wed, 25 Nov 2015 03:01:47 +0100 Subject: [PATCH] added test for rlp iterator and *.swp to gitignore --- .gitignore | 3 +++ src/rlp.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index f56ad1659..eabd0a44e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ Cargo.lock # Generated by Cargo /target/ + +# Vim +*.swp diff --git a/src/rlp.rs b/src/rlp.rs index 20acb8e5f..2f97390c7 100644 --- a/src/rlp.rs +++ b/src/rlp.rs @@ -245,6 +245,9 @@ mod tests { assert!(dog.is_value()); assert_eq!(dog.bytes, &[0x83, b'd', b'o', b'g']); + let none = iter.next(); + assert!(none.is_none()); + let cat_again = rlp.at(0).unwrap(); assert!(cat_again.is_value()); assert_eq!(cat_again.bytes, &[0x83, b'c', b'a', b't']);