iced
iced copied to clipboard
Why not use `FnOnce` rather than `Fn` in `Cache::draw`?
Hello, I'm sorry about my broken English. So let me ask the question directly. In file cache.rs, the method draw
use a impl Fn(&mut Frame)
as its parameter:
pub fn draw(&self, bounds: Size, draw_fn: impl Fn(&mut Frame)) -> Geometry
So, I can't move a iterator into the closure and have to collect the iterator before calling draw
method. I wonder why not just use a FnOnce
?