1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

Fix long client urls #129

This commit is contained in:
Nikolay Kim
2018-03-22 07:44:16 -07:00
parent 1107fdec9d
commit b942bcc4a6
3 changed files with 28 additions and 16 deletions

View File

@ -1,4 +1,4 @@
use std::mem;
use std::{io, mem};
use std::cell::RefCell;
use std::rc::Rc;
use std::collections::VecDeque;
@ -138,3 +138,13 @@ impl Clone for SharedBytes {
SharedBytes(self.0.clone(), self.1.clone())
}
}
impl io::Write for SharedBytes {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.extend_from_slice(buf);
Ok(buf.len())
}
fn flush(&mut self) -> io::Result<()> {
Ok(())
}
}