(
&mut self,
window: Rc<RefCell<MagmaWindow>>,
splitnew: HorizontalOrVertical,
rationew: f32,
)
| 49 | } |
| 50 | |
| 51 | pub fn insert( |
| 52 | &mut self, |
| 53 | window: Rc<RefCell<MagmaWindow>>, |
| 54 | splitnew: HorizontalOrVertical, |
| 55 | rationew: f32, |
| 56 | ) { |
| 57 | match self { |
| 58 | BinaryTree::Empty => { |
| 59 | *self = BinaryTree::Window(window); |
| 60 | } |
| 61 | BinaryTree::Window(w) => { |
| 62 | *self = BinaryTree::Split { |
| 63 | left: Box::new(BinaryTree::Window(w.clone())), |
| 64 | right: Box::new(BinaryTree::Window(window)), |
| 65 | split: splitnew, |
| 66 | ratio: rationew, |
| 67 | }; |
| 68 | } |
| 69 | BinaryTree::Split { |
| 70 | left: _, |
| 71 | right, |
| 72 | split: _, |
| 73 | ratio: _, |
| 74 | } => { |
| 75 | right.insert(window, splitnew, rationew); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | pub fn remove(&mut self, window: &Window) { |
| 81 | match self { |
no outgoing calls
no test coverage detected