chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e63f2f
)
bundles: Implement some more traits for ZipIndex
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 12 May 2021 18:03:33 +0000
(19:03 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 12 May 2021 18:03:33 +0000
(19:03 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs
patch
|
blob
|
history
diff --git
a/src/bundles.rs
b/src/bundles.rs
index 6f0f51e889510d40bb2b9ae46670b0385cc54bc9..817b440fca803eb96e0f4950dc97c8aa79659b0d 100644
(file)
--- 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)]