Remove deprecated items

This commit is contained in:
Mathijs van de Nes 2015-02-06 09:05:02 +01:00
parent 867863cf11
commit e41200c30b
4 changed files with 13 additions and 13 deletions

View file

@ -1,4 +1,4 @@
#![feature(path, io, os)]
#![feature(path, io, os, env, core)]
extern crate zip;
@ -6,10 +6,10 @@ use std::old_io;
fn main()
{
let args = std::os::args();
let args = std::env::args().map(|v| v.into_string().unwrap()).collect::<Vec<_>>();
if args.len() < 2 {
println!("Usage: {} <filename>", args[0]);
std::os::set_exit_status(1);
std::env::set_exit_status(1);
return;
}
let fname = Path::new(&*args[1]);

View file

@ -1,13 +1,13 @@
#![feature(os, path, io)]
#![feature(os, path, io, env)]
extern crate zip;
fn main()
{
let args = std::os::args();
let args = std::env::args().map(|v| v.into_string().unwrap()).collect::<Vec<_>>();
if args.len() < 2 {
println!("Usage: {} <filename>", args[0]);
std::os::set_exit_status(1);
std::env::set_exit_status(1);
return;
}
let fname = Path::new(&*args[1]);

View file

@ -1,13 +1,13 @@
#![feature(io, os, path)]
#![feature(io, os, path, env)]
extern crate zip;
fn main()
{
let args = std::os::args();
let args = std::env::args().map(|v| v.into_string().unwrap()).collect::<Vec<_>>();
if args.len() < 2 {
println!("Usage: {} <filename>", args[0]);
std::os::set_exit_status(1);
std::env::set_exit_status(1);
return;
}

View file

@ -5,7 +5,7 @@ use spec;
use reader_spec;
use result::{ZipResult, ZipError};
use std::old_io;
use std::cell::RefCell;
use std::cell::{RefCell, BorrowState};
use std::collections::HashMap;
use flate2::FlateReader;
use bzip2::reader::BzDecompressor;
@ -89,10 +89,10 @@ impl<T: Reader+Seek> ZipReader<T>
/// May return `ReaderUnavailable` if there is another reader borrowed.
pub fn read_file(&self, file: &ZipFile) -> ZipResult<Box<Reader>>
{
let mut inner_reader = match self.inner.try_borrow_mut()
let mut inner_reader = match self.inner.borrow_state()
{
Some(reader) => reader,
None => return Err(ZipError::ReaderUnavailable),
BorrowState::Unused => self.inner.borrow_mut(),
_ => return Err(ZipError::ReaderUnavailable),
};
let pos = file.data_start as i64;