Add plugins for compositing and net crates #7699

Changed to_string calls to to_owned calls
where was a need.
This commit is contained in:
Maciej Skrzypkowski 2015-09-22 13:47:05 +02:00
parent 44de9173cc
commit 88815d21ba
18 changed files with 43 additions and 31 deletions

View file

@ -41,7 +41,7 @@ pub fn load(load_data: LoadData, start_chan: LoadConsumer) {
let parts: Vec<&str> = scheme_data.splitn(2, ',').collect();
if parts.len() != 2 {
start_sending(start_chan,
metadata).send(Done(Err("invalid data uri".to_string()))).unwrap();
metadata).send(Done(Err("invalid data uri".to_owned()))).unwrap();
return;
}
@ -68,7 +68,7 @@ pub fn load(load_data: LoadData, start_chan: LoadConsumer) {
let bytes = bytes.into_iter().filter(|&b| b != ' ' as u8).collect::<Vec<u8>>();
match bytes.from_base64() {
Err(..) => {
progress_chan.send(Done(Err("non-base64 data uri".to_string()))).unwrap();
progress_chan.send(Done(Err("non-base64 data uri".to_owned()))).unwrap();
}
Ok(data) => {
progress_chan.send(Payload(data)).unwrap();