Skip to content
Snippets Groups Projects
Commit f0e7e6d7 authored by Matthew Hall's avatar Matthew Hall
Browse files

Remove unstable feature convert. Just use slice

parent f21b3277
No related branches found
No related tags found
No related merge requests found
#![feature(convert)]
extern crate flate2;
extern crate xml;
extern crate rustc_serialize as serialize;
......@@ -503,7 +502,7 @@ fn parse_base64<R: Read>(parser: &mut EventReader<R>) -> Result<Vec<u8>, TiledEr
}
fn decode_zlib(data: Vec<u8>) -> Result<Vec<u8>, TiledError> {
let mut zd = ZlibDecoder::new(BufReader::new(data.as_slice()));
let mut zd = ZlibDecoder::new(BufReader::new(&data[..]));
let mut data = Vec::new();
match zd.read_to_end(&mut data) {
Ok(_v) => {},
......@@ -513,7 +512,7 @@ fn decode_zlib(data: Vec<u8>) -> Result<Vec<u8>, TiledError> {
}
fn decode_gzip(data: Vec<u8>) -> Result<Vec<u8>, TiledError> {
let mut gzd = match GzDecoder::new(BufReader::new(data.as_slice())) {
let mut gzd = match GzDecoder::new(BufReader::new(&data[..])) {
Ok(gzd) => gzd,
Err(e) => return Err(TiledError::DecompressingError(e))
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment