Remove deprecation warnings.

This commit is contained in:
Paul Lietar 2015-12-28 01:29:53 +01:00
parent a2db3151bc
commit 09e180b0e2
2 changed files with 4 additions and 5 deletions

View file

@ -1,6 +1,6 @@
#![crate_name = "librespot"]
#![feature(plugin,zero_one,iter_arith,slice_bytes,mpsc_select)]
#![feature(plugin,zero_one,iter_arith,slice_bytes,mpsc_select,clone_from_slice)]
#![plugin(protobuf_macros)]
#[macro_use] extern crate lazy_static;

View file

@ -1,9 +1,8 @@
use eventual::Async;
use protobuf::{self, Message};
use protobuf;
use std::any::{Any, TypeId};
use std::collections::HashMap;
use std::fmt;
use std::slice::bytes::copy_memory;
use std::sync::{Arc, Condvar, Mutex, MutexGuard, Weak};
use std::thread;
@ -35,7 +34,7 @@ impl MetadataTrait for Track {
files: msg.get_file().iter()
.map(|file| {
let mut dst = [0u8; 20];
copy_memory(&file.get_file_id(), &mut dst);
dst.clone_from_slice(&file.get_file_id());
FileId(dst)
})
.collect(),
@ -67,7 +66,7 @@ impl MetadataTrait for Album {
covers: msg.get_cover_group().get_image().iter()
.map(|image| {
let mut dst = [0u8; 20];
copy_memory(&image.get_file_id(), &mut dst);
dst.clone_from_slice(&image.get_file_id());
FileId(dst)
})
.collect(),