File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,19 @@ using DynamicVamanaIndexLeanVecImplManager =
126126
127127// DynamicVamanaIndex interface implementation
128128Status DynamicVamanaIndex::check_storage_kind (StorageKind storage_kind) noexcept {
129- return runtime_error_wrapper ([&] {
130- return storage::is_supported_storage_kind (storage_kind)
131- ? Status_Ok
132- : Status (
133- ErrorCode::INVALID_ARGUMENT,
134- " The specified storage kind is not compatible with the "
135- " DynamicVamanaIndex"
136- );
129+ bool supported = false ;
130+ auto status = runtime_error_wrapper ([&] {
131+ supported = storage::is_supported_storage_kind (storage_kind);
137132 });
133+ if (!status.ok ()) {
134+ return status;
135+ }
136+ return supported ? Status_Ok
137+ : Status (
138+ ErrorCode::INVALID_ARGUMENT,
139+ " The specified storage kind is not compatible with the "
140+ " DynamicVamanaIndex"
141+ );
138142}
139143
140144Status DynamicVamanaIndex::build (
You can’t perform that action at this time.
0 commit comments