Impl Debug for KMerge
@@ -3,6 +3,7 @@ use size_hint;
use Itertools;
use std::mem::replace;
+use std::fmt;
macro_rules! clone_fields {
($name:ident, $base:expr, $($field:ident),+) => (
@@ -117,6 +118,13 @@ pub struct KMerge<I>
heap: Vec<HeadTail<I>>,
}
+impl<I> fmt::Debug for KMerge<I>
+ where I: Iterator + fmt::Debug,
+ I::Item: fmt::Debug,
+{
+ debug_fmt_fields!(KMerge, heap);
+}
+
/// Create an iterator that merges elements of the contained iterators using
/// the ordering function.
///
