diff --git a/src/inventory/mod.rs b/src/inventory/mod.rs index a08eb86..b1a1d28 100644 --- a/src/inventory/mod.rs +++ b/src/inventory/mod.rs @@ -450,10 +450,8 @@ impl InventoryContext { (None, Some(mut item)) => { if !left && item.stack.count > 1 { let mut cursor = item.clone(); - // TODO: this is a stable version of: div_ceil(2) - once this is stabilized, use it instead - cursor.stack.count = - (item.stack.count / 2) + (item.stack.count % 2); - item.stack.count -= cursor.stack.count; + item.stack.count /= 2; + cursor.stack.count -= item.stack.count; (Some(cursor), Some(item)) } else { (Some(item), None)