error: captured variable cannot escape `FnMut` closure body --> src/main.rs:387:86 | 386 | let mut err: Option> = None; | ------- variable defined here 387 | let mut k = Box::pin(get_all_bans(sql_pool).await.filter_map(|r| async { | ____________________________________________________________________________________-_^ | | | | | inferred to be a `FnMut` closure 388 | | match r { 389 | | Ok(b) => Some(row![ 390 | | cell!(b.ip.to_string()), ... | 399 | | err = Some(Box::new(e)); | | --- variable captured here ... | 402 | | } 403 | | })); | |_____________________^ returns an `async` block that contains a reference to a captured variable, which then escapes the closure body | = note: `FnMut` closures only have access to their captured variables while they are executing... = note: ...therefore, they cannot allow references to captured variables to escape