mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
sstable_directory: Shorten lister loop
Squash call to lister.get() and check for the returned value into while()'s condition. This saves few more lines of code as well. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -315,11 +315,7 @@ future<> sstable_directory::filesystem_components_lister::process(sstable_direct
|
||||
abstract_lister::make<s3::client::bucket_lister>(_client, _bucket, _directory.native() + "/", &manifest_json_filter);
|
||||
|
||||
co_await with_closeable(std::move(lister), coroutine::lambda([this, &directory] (abstract_lister& lister) -> future<> {
|
||||
while (true) {
|
||||
auto de = co_await lister.get();
|
||||
if (!de) {
|
||||
break;
|
||||
}
|
||||
while (auto de = co_await lister.get()) {
|
||||
auto component_path = _directory / de->name;
|
||||
auto comps = sstables::parse_path(component_path, directory._schema->ks_name(), directory._schema->cf_name());
|
||||
handle(std::move(comps), component_path);
|
||||
|
||||
Reference in New Issue
Block a user