crimson/os/seastore: use structured binding

for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-06-05 17:22:35 +08:00
parent 9370ac9fa8
commit ca48d1cbdb

View File

@ -48,13 +48,9 @@ CollectionNode::list()
{
read_to_local();
logger().debug("CollectionNode:{}, {}", __func__, *this);
std::vector<std::pair<coll_t, coll_info_t>> list_result;
for (auto &&it : decoded) {
list_result.emplace_back(
std::make_pair(
static_cast<coll_t>(it.first),
coll_info_t{ it.second }
));
CollectionManager::list_ret_bare list_result;
for (auto &[coll, bits] : decoded) {
list_result.emplace_back(coll, bits);
}
return list_ret(
list_ertr::ready_future_marker{},