From 0ee1dfdfbd1b4f5fb5c5c7ea47e6d77f34791e9b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 12 May 2021 19:03:33 +0100 Subject: [PATCH] bundles: Implement some more traits for ZipIndex Signed-off-by: Ian Jackson --- src/bundles.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bundles.rs b/src/bundles.rs index 6f0f51e8..817b440f 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -281,7 +281,12 @@ pub struct IndexedZip { } deref_to_field_mut!{IndexedZip, ZipArchive, za } +#[derive(Debug,Copy,Clone,Hash,Eq,PartialEq,Ord,PartialOrd)] pub struct ZipIndex(pub usize); +impl Display for ZipIndex { + #[throws(fmt::Error)] + fn fmt(&self, f: &mut Formatter) { write!(f,"{}",self.0)? } +} impl IndexedZip where { #[throws(LoadError)] -- 2.30.2