diff --git a/compute/cker/include/cker/Utils.h b/compute/cker/include/cker/Utils.h index 16285f3cbb8..f3cbf5c3b86 100644 --- a/compute/cker/include/cker/Utils.h +++ b/compute/cker/include/cker/Utils.h @@ -494,9 +494,12 @@ inline std::ostream &operator<<(std::ostream &os, const Shape &shape) return std::move(joined).append(std::to_string(dim)).append(","); }); - if (formatted.back() == '[') { + if (formatted.back() == '[') + { formatted.push_back(']'); - } else { + } + else + { formatted.back() = ']'; } diff --git a/compute/cker/src/ShapeIterator.test.cc b/compute/cker/src/ShapeIterator.test.cc index ea49f249b2c..97c752b5387 100644 --- a/compute/cker/src/ShapeIterator.test.cc +++ b/compute/cker/src/ShapeIterator.test.cc @@ -78,7 +78,8 @@ TEST(CKer_Utils, ShapeIterator_basic) // test and demostrate the usage of iterators with STL algos const auto first = begin(test_shape); const auto last = end(test_shape); - const auto shape_elems = std::accumulate(first, last, 1, std::multiplies{}); + const auto shape_elems = + std::accumulate(first, last, 1, std::multiplies{}); EXPECT_EQ(shape_elems, test_shape.FlatSize()); } @@ -105,4 +106,3 @@ TEST(CKer_Utils, neg_ShapeIterator_empty_shape) EXPECT_EQ(ss.str(), "[]"); } } -