Improve lifetime handling in collectBlocks
Changelog-None Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -257,7 +257,6 @@ extension NdbBlockGroup {
|
||||
// Start the iteration
|
||||
self.metadata.borrow { value in
|
||||
ndb_blocks_iterate_start(cptr, value.as_ptr(), &iter)
|
||||
}
|
||||
|
||||
// Collect blocks into array
|
||||
while let ptr = ndb_blocks_iterate_next(&iter),
|
||||
@@ -265,6 +264,7 @@ extension NdbBlockGroup {
|
||||
blocks.append(block)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return blocks
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user