mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 17:59:24 +02:00
Remove usage of deprecated tokio_core::io
This commit is contained in:
parent
630de8c0a9
commit
d36017d6f0
13 changed files with 76 additions and 62 deletions
|
@ -1,9 +1,9 @@
|
|||
use byteorder::{BigEndian, ByteOrder, WriteBytesExt};
|
||||
use bytes::Bytes;
|
||||
use futures::sync::oneshot;
|
||||
use futures::{Async, Future, Poll};
|
||||
use std::collections::HashMap;
|
||||
use std::io::Write;
|
||||
use tokio_core::io::EasyBuf;
|
||||
|
||||
use util::SeqGenerator;
|
||||
use util::{SpotifyId, FileId};
|
||||
|
@ -22,8 +22,8 @@ component! {
|
|||
}
|
||||
|
||||
impl AudioKeyManager {
|
||||
pub fn dispatch(&self, cmd: u8, mut data: EasyBuf) {
|
||||
let seq = BigEndian::read_u32(data.drain_to(4).as_ref());
|
||||
pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
let seq = BigEndian::read_u32(data.split_to(4).as_ref());
|
||||
|
||||
let sender = self.lock(|inner| inner.pending.remove(&seq));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue