From 2c95d0988d01fed2440e8756e98cdea925b61df4 Mon Sep 17 00:00:00 2001 From: Anurag Naik <120748645+AnuRage-git@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:43:16 +0530 Subject: [PATCH] formatted backend.rs as suggested --- core/src/services/memory/backend.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/services/memory/backend.rs b/core/src/services/memory/backend.rs index b7f850333a1f..ad9c6dfddf88 100644 --- a/core/src/services/memory/backend.rs +++ b/core/src/services/memory/backend.rs @@ -30,17 +30,15 @@ use serde::Deserialize; use self::raw::ConfigDeserializer; -//Config for memory. +///Config for memory. #[derive(Default, Deserialize)] #[serde(default)] #[non_exhaustive] - -pub struct MemoryConfig{ +pub struct MemoryConfig { //root of the backend. pub root: Option, } - /// In memory service support. (BTreeMap Based) #[doc = include_str!("docs.md")] #[derive(Default)] @@ -61,9 +59,9 @@ impl Builder for MemoryBuilder { type Accessor = MemoryBackend; fn from_map(map: HashMap) -> Self { - MemoryBuilder{ + MemoryBuilder { config: MemoryConfig::deserialize(ConfigDeserializer::new(map)) - .expect("config deserialize must succeed"), + .expect("config deserialize must succeed"), } }