now compiles on stable

master
Avril 4 years ago
parent 860b427584
commit d899823887
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -22,3 +22,6 @@ reqwest = {version = "0.10", features= ["stream"]}
memmap = "0.7"
getrandom = "0.1"
base64 = "0.12"
[target.'cfg(not(nightly))'.dependencies]
linked-list = "0.0"

@ -97,7 +97,6 @@ impl<T> LinkedList<T>
assert!(at < self.sz, "Cannot remove at element > than size");
todo!()
//TODO: Implement through iter_mut()
}
}

@ -1,6 +1,6 @@
#![feature(linked_list_remove)]
#![feature(label_break_value)]
#![feature(never_type)]
#![cfg_attr(nightly, feature(linked_list_remove))]
//#![feature(label_break_value)]
//#![feature(never_type)]
#![allow(dead_code)]

@ -108,7 +108,7 @@ pub async fn work(conf: config::Config) -> Result<(), Box<dyn std::error::Error>
prog_send!(link unwind prog.push_task(&task));
let temp = tempfile::TempFile::new();
let return_value = 'clean: {
let return_value = loop {
match perform(&url, &temp, &mut prog).await {
Err(e) => prog_send!(link prog.println(format!("Failed downloading {} -> {:?}: {}", url, temp, e))),
Ok(_) => {
@ -120,15 +120,15 @@ pub async fn work(conf: config::Config) -> Result<(), Box<dyn std::error::Error>
Ok(v) => v,
Err(e) => {
prog_send!(link prog.println(format!("Failed decoding: {}", e)));
break 'clean Some(e);
break Some(e);
},
};
prog_send!(link prog.println(format!("{:?} Complete", loli)));
break 'clean None;
break None;
},
};
Some(error::Error::Unknown)
break Some(error::Error::Unknown);
};
prog_send!(link prog.pop_task(task));

@ -1,12 +1,20 @@
use super::*;
#[cfg(nightly)]
use std::{
collections::LinkedList,
};
#[cfg(not(nightly))]
use linked_list::LinkedList;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TaskList(LinkedList<(usize, String)>, String, usize);
#[cfg(not(nightly))]
unsafe impl std::marker::Send for TaskList{}
#[cfg(not(nightly))]
unsafe impl std::marker::Sync for TaskList{}
fn find<T,F>(list: &LinkedList<T>, mut fun: F) -> Option<usize>
where F: FnMut(&T) -> bool
{

Loading…
Cancel
Save