From 78863ee7090e7a43ed87bd24fffed8d62da73241 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sun, 31 Mar 2024 18:16:41 -0400 Subject: [PATCH] Cleanups --- otg/core/src/types.rs | 3 --- otg/gtk/src/components/review_tree.rs | 2 -- 2 files changed, 5 deletions(-) diff --git a/otg/core/src/types.rs b/otg/core/src/types.rs index 1d26929..7a4e5ad 100644 --- a/otg/core/src/types.rs +++ b/otg/core/src/types.rs @@ -320,7 +320,6 @@ impl Tree { .iter() .take_while(|n| **n != node.id) .fold(0, |acc, n| acc + self.width(*n)); - println!("[{}] sibling width {}", idx, sibling_width); (node.depth, parent_column + sibling_width) } @@ -340,7 +339,6 @@ impl Tree { // My algorithm right now is likely to generate unnecessarily wide trees in a complex game // review. fn width(&self, id: usize) -> usize { - println!("[{}] calculating width", id); let node = &self.nodes[id]; if let Some(width) = *node.width.borrow() { return width; @@ -351,7 +349,6 @@ impl Tree { .iter() .fold(0, |acc, child| acc + self.width(*child)); let width = if width == 0 { 1 } else { width }; - println!("[{}] width: {}", id, width); *node.width.borrow_mut() = Some(width); width diff --git a/otg/gtk/src/components/review_tree.rs b/otg/gtk/src/components/review_tree.rs index 62d9516..28acbe2 100644 --- a/otg/gtk/src/components/review_tree.rs +++ b/otg/gtk/src/components/review_tree.rs @@ -67,7 +67,6 @@ impl ReviewTree { } pub fn redraw(&self, ctx: &Context, _width: i32, _height: i32) { - println!("redraw"); let tree: &Option> = &self.imp().tree.borrow(); match tree { Some(ref tree) => { @@ -78,7 +77,6 @@ impl ReviewTree { // code? ctx.set_source_rgb(0.7, 0.7, 0.7); let (row, column) = tree.position(node.id); - println!("[{}] {} x {}", node.id, row, column); let y = (row as f64) * 20. + 10.; let x = (column as f64) * 20. + 10.; ctx.arc(x, y, 5., 0., 2. * std::f64::consts::PI);