diff --git a/src/builder/validator/buttoninfo.rs b/src/builder/validator/buttoninfo.rs index 2596dc8..a9c27a7 100644 --- a/src/builder/validator/buttoninfo.rs +++ b/src/builder/validator/buttoninfo.rs @@ -35,6 +35,7 @@ pub struct NeighbourInfo { pub id: String, } +#[derive(Debug)] pub struct ButtonInfo { // global unique id, if set pub id: String, diff --git a/src/builder/validator/mandatory.rs b/src/builder/validator/mandatory.rs index 7eff2aa..8abe0a3 100644 --- a/src/builder/validator/mandatory.rs +++ b/src/builder/validator/mandatory.rs @@ -69,3 +69,12 @@ impl Mandatory { } } } + +impl std::fmt::Debug for Mandatory { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Mandatory") + .field("value", &self.value) + .field("modified", &self.modified) + .finish() + } +} diff --git a/src/elements/grid.rs b/src/elements/grid.rs index 717cd39..eacfef8 100644 --- a/src/elements/grid.rs +++ b/src/elements/grid.rs @@ -581,9 +581,9 @@ impl Grid { dim: (usize, usize), ) -> Result { match Self::search_neighbour_in_direction(grid, pos, (0, 1), dim) { - Some(north_neighbour) => { - current_child.set_south_neighbour(Some(&north_neighbour)); - north_neighbour.set_north_neighbour(Some(current_child)); + Some(neighbour) => { + current_child.set_south_neighbour(Some(&neighbour)); + neighbour.set_north_neighbour(Some(current_child)); Ok(true) } @@ -599,9 +599,9 @@ impl Grid { dim: (usize, usize), ) -> Result { match Self::search_neighbour_in_direction(grid, pos, (0, -1), dim) { - Some(north_neighbour) => { - current_child.set_north_neighbour(Some(&north_neighbour)); - north_neighbour.set_south_neighbour(Some(current_child)); + Some(neighbour) => { + current_child.set_north_neighbour(Some(&neighbour)); + neighbour.set_south_neighbour(Some(current_child)); Ok(true) } @@ -617,9 +617,9 @@ impl Grid { dim: (usize, usize), ) -> Result { match Self::search_neighbour_in_direction(grid, pos, (1, 0), dim) { - Some(north_neighbour) => { - current_child.set_east_neighbour(Some(&north_neighbour)); - north_neighbour.set_west_neighbour(Some(current_child)); + Some(neighbour) => { + current_child.set_east_neighbour(Some(&neighbour)); + neighbour.set_west_neighbour(Some(current_child)); Ok(true) } @@ -635,9 +635,9 @@ impl Grid { dim: (usize, usize), ) -> Result { match Self::search_neighbour_in_direction(grid, pos, (-1, 0), dim) { - Some(north_neighbour) => { - current_child.set_west_neighbour(Some(&north_neighbour)); - north_neighbour.set_east_neighbour(Some(current_child)); + Some(neighbour) => { + current_child.set_west_neighbour(Some(&neighbour)); + neighbour.set_east_neighbour(Some(current_child)); Ok(true) } diff --git a/src/guihandler/guihandler.rs b/src/guihandler/guihandler.rs index c99ebad..b71b564 100644 --- a/src/guihandler/guihandler.rs +++ b/src/guihandler/guihandler.rs @@ -735,7 +735,7 @@ impl GuiHandler { Ok(false) } - fn current_selectable(&self) -> Result>> { + pub fn current_selectable(&self) -> Result>> { match self.current_selectable.read().unwrap().as_ref() { Some(selectable) => Ok(Some(selectable.clone())), None => Ok(None), @@ -1268,7 +1268,7 @@ impl GuiHandler { } } -// private +// private - create rendering stuff impl GuiHandler { fn create_render_targets( device: &Arc,