Skip to content

Commit

Permalink
formatted backend.rs as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
AnuRage-git authored Mar 12, 2024
1 parent 8108e97 commit 2c95d09
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/src/services/memory/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
}


/// In memory service support. (BTreeMap Based)
#[doc = include_str!("docs.md")]
#[derive(Default)]
Expand All @@ -61,9 +59,9 @@ impl Builder for MemoryBuilder {
type Accessor = MemoryBackend;

fn from_map(map: HashMap<String, String>) -> Self {
MemoryBuilder{
MemoryBuilder {
config: MemoryConfig::deserialize(ConfigDeserializer::new(map))
.expect("config deserialize must succeed"),
.expect("config deserialize must succeed"),
}
}

Expand Down

0 comments on commit 2c95d09

Please sign in to comment.