From 21f03a81ed8e10c6c441c315902c7b3a9ab3f4a4 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Fri, 27 Oct 2023 17:36:04 +0200 Subject: [PATCH] static memory plugin fix --- .../src/memory_backend/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/zenoh-plugin-storage-manager/src/memory_backend/mod.rs b/plugins/zenoh-plugin-storage-manager/src/memory_backend/mod.rs index 17927c40cf..fb148da0e4 100644 --- a/plugins/zenoh-plugin-storage-manager/src/memory_backend/mod.rs +++ b/plugins/zenoh-plugin-storage-manager/src/memory_backend/mod.rs @@ -13,21 +13,17 @@ // use async_std::sync::RwLock; use async_trait::async_trait; -use zenoh_plugin_trait::Plugin; use std::collections::HashMap; use std::sync::Arc; use zenoh::prelude::r#async::*; use zenoh::time::Timestamp; use zenoh_backend_traits::config::{StorageConfig, VolumeConfig}; use zenoh_backend_traits::*; +use zenoh_plugin_trait::Plugin; use zenoh_result::ZResult; use crate::MEMORY_BACKEND_NAME; -pub fn create_memory_backend(config: VolumeConfig) -> ZResult { - Ok(Box::new(MemoryBackend { config })) -} - pub struct MemoryBackend { config: VolumeConfig, } @@ -38,8 +34,10 @@ impl Plugin for MemoryBackend { const STATIC_NAME: &'static str = MEMORY_BACKEND_NAME; - fn start(name: &str, args: &Self::StartArgs) -> ZResult { - todo!() + fn start(_: &str, args: &VolumeConfig) -> ZResult { + Ok(Box::new(MemoryBackend { + config: args.clone(), + })) } }