Minor: removed some unreachable code from partition and partition_all