Skip to content

Commit a4c6cae

Browse files
committed
refactor: Replaced SetupState with ()
Signed-off-by: Anush008 <[email protected]>
1 parent 4a0bdf5 commit a4c6cae

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Diff for: src/ops/storages/qdrant.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,9 @@ impl Display for CollectionId {
282282
}
283283
}
284284

285-
#[derive(Debug, Clone, Serialize, Deserialize)]
286-
pub struct SetupState {}
287-
288285
impl StorageFactoryBase for Arc<Factory> {
289286
type Spec = Spec;
290-
type SetupState = SetupState;
287+
type SetupState = ();
291288
type Key = String;
292289

293290
fn name(&self) -> &str {
@@ -306,7 +303,6 @@ impl StorageFactoryBase for Arc<Factory> {
306303
// TODO(Anush008): Add as a field to the Spec
307304
let url = "http://localhost:6334/";
308305
let collection_name = spec.collection_name.clone();
309-
let setup_state = SetupState {};
310306
let executors = async move {
311307
let executor = Arc::new(Executor::new(
312308
url,
@@ -323,25 +319,25 @@ impl StorageFactoryBase for Arc<Factory> {
323319
Ok(ExportTargetBuildOutput {
324320
executor: executors.boxed(),
325321
setup_key: collection_name,
326-
desired_setup_state: setup_state,
322+
desired_setup_state: (),
327323
})
328324
}
329325

330326
fn check_setup_status(
331327
&self,
332328
_key: String,
333-
_desired: Option<SetupState>,
334-
_existing: setup::CombinedState<SetupState>,
335-
) -> Result<impl setup::ResourceSetupStatusCheck<String, SetupState> + 'static> {
329+
_desired: Option<()>,
330+
_existing: setup::CombinedState<()>,
331+
) -> Result<impl setup::ResourceSetupStatusCheck<String, ()> + 'static> {
336332
Err(anyhow!(
337333
"Set `setup_by_user` to `true` to use Qdrant storage"
338334
)) as Result<Infallible, _>
339335
}
340336

341337
fn check_state_compatibility(
342338
&self,
343-
_desired: &SetupState,
344-
_existing: &SetupState,
339+
_desired: &(),
340+
_existing: &(),
345341
) -> Result<SetupStateCompatibility> {
346342
Ok(SetupStateCompatibility::Compatible)
347343
}

0 commit comments

Comments
 (0)