Add methods to move ByteStrings underlying bytes

Add methods to move the underlying Vec<u8> for ByteString.
This commit is contained in:
Daniel Robertson 2016-02-17 19:45:35 +00:00
parent 184c7dbd47
commit d23774d3d7
4 changed files with 32 additions and 1 deletions

View file

@ -435,7 +435,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
None => {}
}
headers.set_raw(name_str.to_owned(), vec![value.to_vec()]);
headers.set_raw(name_str.to_owned(), vec![value.into()]);
Ok(())
}