mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use empty Vec instead of None.
This commit is contained in:
parent
5a66b59f9b
commit
572616605a
2 changed files with 14 additions and 23 deletions
|
@ -82,14 +82,14 @@ impl Blob {
|
|||
}
|
||||
|
||||
pub trait BlobHelpers {
|
||||
fn read_out_buffer(self) -> Receiver<Option<Vec<u8>>> ;
|
||||
fn read_out_buffer(self) -> Receiver<Vec<u8>>;
|
||||
fn read_out_type(self) -> DOMString;
|
||||
}
|
||||
|
||||
impl<'a> BlobHelpers for &'a Blob {
|
||||
fn read_out_buffer(self) -> Receiver<Option<Vec<u8>>> {
|
||||
fn read_out_buffer(self) -> Receiver<Vec<u8>> {
|
||||
let (send, recv) = mpsc::channel();
|
||||
send.send(self.bytes.clone()).unwrap();
|
||||
send.send(self.bytes.clone().unwrap_or(vec![])).unwrap();
|
||||
recv
|
||||
}
|
||||
fn read_out_type(self) -> DOMString {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue