blitzarx1 / egui_graphs

Interactive graph visualization widget for rust powered by egui and petgraph
https://docs.rs/crate/egui_graphs
MIT License
417 stars 30 forks source link

Examples throw FnMut error #161

Closed cds-internationalist closed 9 months ago

cds-internationalist commented 9 months ago

The following error is thrown when trying to run examples;

expected a 'FnMut(&mut Ui)' closure, found 'GraphView<'_, (), ()>

On lines in the update function where we ui.add(&mut GraphView::<...

blitzarx1 commented 9 months ago

what example have you tried to run?

cds-internationalist commented 9 months ago

Figured out my issue - error was behind the keyboard - I hadn't properly copied some of the "use" statements, so I was using petgraph::graph::Graph instead of egui_graphs::Graph