Check for empty vector in vector Debug
This commit is contained in:
parent
699d57d9dd
commit
7bc91d3c68
|
@ -1986,6 +1986,10 @@ pub fn format_column_vec_as_row<T: Scalar + fmt::Display, D: crate::DimName>(
|
||||||
where
|
where
|
||||||
DefaultAllocator: Allocator<T, D>,
|
DefaultAllocator: Allocator<T, D>,
|
||||||
{
|
{
|
||||||
|
if vector.is_empty() {
|
||||||
|
return write!(f, "[ ]");
|
||||||
|
}
|
||||||
|
|
||||||
write!(f, "[")?;
|
write!(f, "[")?;
|
||||||
let mut it = vector.iter();
|
let mut it = vector.iter();
|
||||||
std::fmt::Display::fmt(it.next().unwrap(), f)?;
|
std::fmt::Display::fmt(it.next().unwrap(), f)?;
|
||||||
|
|
Loading…
Reference in New Issue