MCPcopy Create free account
hub / github.com/MagmaWM/MagmaWM / next_split

Method next_split

src/utils/binarytree.rs:113–138  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

111 }
112
113 pub fn next_split(&self) -> HorizontalOrVertical {
114 match self {
115 BinaryTree::Empty => HorizontalOrVertical::Horizontal,
116 BinaryTree::Window(_w) => HorizontalOrVertical::Horizontal,
117 BinaryTree::Split {
118 left: _,
119 right,
120 split,
121 ratio: _,
122 } => {
123 if let BinaryTree::Split {
124 left: _,
125 right: _,
126 split: _,
127 ratio: _,
128 } = right.as_ref()
129 {
130 right.next_split()
131 } else if *split == HorizontalOrVertical::Horizontal {
132 HorizontalOrVertical::Vertical
133 } else {
134 HorizontalOrVertical::Horizontal
135 }
136 }
137 }
138 }
139}
140
141impl Default for BinaryTree {

Callers 1

add_windowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected