These lines (any with &get_path)
let fut1 = Box::new( Http::get(&get_path(0)));
return this error
- temporary value is freed at the end of this statement
---- coercion requires that borrow lasts for 'static
I did find a solution but I have yet to understand why it works, + use<>
impl Http { pub fn get(path: &str) -> impl Future<Output = String> + use<> { HttpGetFuture::new(path) } }