mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-30 21:51:38 +00:00
remove crate tokio-codec (seems to be part of tokio now)
This commit is contained in:
parent
85722a8492
commit
e35404deb7
@ -16,7 +16,6 @@ use futures::future::{self, Either};
|
|||||||
//use tokio::prelude::*;
|
//use tokio::prelude::*;
|
||||||
//use tokio::timer::Delay;
|
//use tokio::timer::Delay;
|
||||||
use tokio::fs::File;
|
use tokio::fs::File;
|
||||||
use tokio_codec;
|
|
||||||
//use bytes::{BytesMut, BufMut};
|
//use bytes::{BytesMut, BufMut};
|
||||||
|
|
||||||
//use hyper::body::Payload;
|
//use hyper::body::Payload;
|
||||||
@ -324,7 +323,7 @@ fn chuncked_static_file_download(filename: PathBuf) -> BoxFut {
|
|||||||
Box::new(File::open(filename)
|
Box::new(File::open(filename)
|
||||||
.map_err(|err| http_err!(BAD_REQUEST, format!("File open failed: {}", err)))
|
.map_err(|err| http_err!(BAD_REQUEST, format!("File open failed: {}", err)))
|
||||||
.and_then(move |file| {
|
.and_then(move |file| {
|
||||||
let payload = tokio_codec::FramedRead::new(file, tokio_codec::BytesCodec::new()).
|
let payload = tokio::codec::FramedRead::new(file, tokio::codec::BytesCodec::new()).
|
||||||
map(|bytes| {
|
map(|bytes| {
|
||||||
//sigh - howto avoid copy here? or the whole map() ??
|
//sigh - howto avoid copy here? or the whole map() ??
|
||||||
hyper::Chunk::from(bytes.to_vec())
|
hyper::Chunk::from(bytes.to_vec())
|
||||||
|
Loading…
Reference in New Issue
Block a user