Which UI code specifically are you referring to and why would the borrow checker prevent you from factoring it out?
But here: https://github.com/gtk-rs/gtk4-rs/blob/master/examples/text_...
and here: https://github.com/gtk-rs/gtk4-rs/blob/master/examples/clock...
The moment some poor slob of a beginner tries to refactor any of those closures into a "normal" function, they're going to get beat over the head by the borrow checker.
Yes, I know why they're required in Rust. And it makes sense once you know Rust well. But a beginner isn't likely to understand why they can't refactor a closure into a function in Rust without a whole lot of clone().
Coding "examples" for Rust need to stop using that closure style--especially in "beginner" code.