mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove as_mut_slice() calls.
This commit is contained in:
parent
a862479ca8
commit
9185c3de79
6 changed files with 7 additions and 7 deletions
|
@ -56,7 +56,7 @@ enum ReadResult {
|
|||
fn read_block<R: Read>(reader: &mut R) -> Result<ReadResult, ()> {
|
||||
let mut buf = vec![0; 1024];
|
||||
|
||||
match reader.read(buf.as_mut_slice()) {
|
||||
match reader.read(&mut buf) {
|
||||
Ok(len) if len > 0 => {
|
||||
unsafe { buf.set_len(len); }
|
||||
Ok(ReadResult::Payload(buf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue