From 2a3fe099a6ddc3829ad3ebeefe0fd1700a47ba3f Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Mon, 8 Aug 2016 17:34:02 +0200 Subject: [PATCH] Derive Debug for read::ZipArchive Resolves #15 --- src/compression.rs | 2 +- src/read.rs | 1 + src/types.rs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compression.rs b/src/compression.rs index 29dbb64c..927fc9e1 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -1,7 +1,7 @@ //! Possible ZIP compression methods. /// Compression methods for the contents of a ZIP file. -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, PartialEq, Debug)] pub enum CompressionMethod { /// The file is stored (no compression) diff --git a/src/read.rs b/src/read.rs index 57641abd..24e2a154 100644 --- a/src/read.rs +++ b/src/read.rs @@ -48,6 +48,7 @@ mod ffi { /// /// println!("Result: {:?}", doit()); /// ``` +#[derive(Debug)] pub struct ZipArchive { reader: R, diff --git a/src/types.rs b/src/types.rs index 61578dc4..f0c2203a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -3,7 +3,7 @@ use time; -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] pub enum System { Dos, @@ -29,6 +29,7 @@ impl System { pub const DEFAULT_VERSION: u8 = 20; /// Structure representing a ZIP file. +#[derive(Debug)] pub struct ZipFileData { /// Compatibility of the file attribute information