This PR lets egui_graphs::to_graph_custom accept generic functions and closures.
This was still possible in 0.15, but unfortunately, starting from 0.16 it only accepts bare function pointers. This has the downside that it's no longer possible to reference external state while transforming a graph. Well, unless you hack something together using global variables but I was unwilling to go that route 😉.
This PR lets
egui_graphs::to_graph_custom
accept generic functions and closures.This was still possible in
0.15
, but unfortunately, starting from0.16
it only accepts bare function pointers. This has the downside that it's no longer possible to reference external state while transforming a graph. Well, unless you hack something together using global variables but I was unwilling to go that route 😉.