SIX size stash

This commit is contained in:
ntr
2019-11-22 16:26:43 +11:00
parent d4f2f9623f
commit 2d3c6cd18c
6 changed files with 41 additions and 37 deletions
+3 -3
View File
@@ -100,7 +100,7 @@ impl Vbox {
}
pub fn accept(&mut self, i: usize, j: usize, construct_id: Option<Uuid>) -> Result<&mut Vbox, Error> {
if self.bound.len() >= 4 && !construct_id.is_some() {
if self.bound.len() >= 6 && !construct_id.is_some() {
return Err(err_msg("too many items bound"));
}
@@ -150,7 +150,7 @@ impl Vbox {
for vi in vbox_indicies.iter() {
inv_indices.push(self.bound.len());
self.accept(vi[0], vi[1], Some(Uuid::nil()))?;
}
}
// have to sort the indices and keep track of the iteration
// because when removing the elements the array shifts
@@ -171,7 +171,7 @@ impl Vbox {
self.bound.push(combo.item);
// self.bound.sort_unstable();
if self.bound.len() >= 5 {
if self.bound.len() >= 6 {
return Err(err_msg("too many items bound"));
}
Ok(self)