Remove log dependency
This commit is contained in:
parent
814df34916
commit
fa64e18a54
5 changed files with 7 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
|
||||
name = "zip"
|
||||
version = "0.0.6"
|
||||
version = "0.0.7"
|
||||
authors = ["Mathijs van de Nes <git@mathijs.vd-nes.nl>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/mvdnes/zip-rs.git"
|
||||
|
@ -13,7 +13,6 @@ Library to support the reading and writing of zip files.
|
|||
flate2 = "*"
|
||||
bzip2 = "*"
|
||||
time = "*"
|
||||
log = "*"
|
||||
|
||||
[[bin]]
|
||||
name = "extract"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(unstable)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
extern crate time;
|
||||
extern crate flate2;
|
||||
extern crate bzip2;
|
||||
|
|
|
@ -95,7 +95,6 @@ fn parse_extra_field(_file: &mut ZipFile, data: &[u8]) -> ZipResult<()>
|
|||
{
|
||||
let kind = try!(reader.read_le_u16());
|
||||
let len = try!(reader.read_le_u16());
|
||||
debug!("Parsing extra block {:04x}", kind);
|
||||
match kind
|
||||
{
|
||||
_ => try!(reader.seek(len as i64, io::SeekCur)),
|
||||
|
|
|
@ -23,7 +23,10 @@ pub fn msdos_datetime_to_tm(time: u16, date: u16) -> Tm
|
|||
match time::strptime(&*datetime, format)
|
||||
{
|
||||
Ok(tm) => tm,
|
||||
Err(m) => { debug!("Failed parsing date: {}", m); time::empty_tm() },
|
||||
Err(m) => {
|
||||
let _ = write!(&mut ::std::io::stdio::stderr(), "Failed parsing date: {}", m);
|
||||
time::empty_tm()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -206,10 +206,8 @@ impl<W: Writer+Seek> Drop for ZipWriter<W>
|
|||
{
|
||||
if !self.inner.is_closed()
|
||||
{
|
||||
match self.finalize()
|
||||
{
|
||||
Ok(_) => {},
|
||||
Err(e) => warn!("ZipWriter drop failed: {:?}", e),
|
||||
if let Err(e) = self.finalize() {
|
||||
let _ = write!(&mut ::std::io::stdio::stderr(), "ZipWriter drop failed: {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue