Skip to content

Commit 95cf5fc

Browse files
committed
Bump quickleaf version to 0.2.7; add getter methods for list and map in Cache
1 parent d46aca6 commit 95cf5fc

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quickleaf"
3-
version = "0.2.6"
3+
version = "0.2.7"
44
edition = "2021"
55
license = "Apache-2.0"
66
authors = ["Philippe Assis <codephilippe@gmail.com>"]

src/cache.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::collections::HashMap;
22
use std::fmt::Debug;
3+
use std::hash::Hash;
34

45
use valu3::traits::ToValueBehavior;
56
use valu3::value::Value;
@@ -113,6 +114,14 @@ impl Cache {
113114
self.map.get(key)
114115
}
115116

117+
pub fn get_list(&self) -> &Vec<Key> {
118+
&self.list
119+
}
120+
121+
pub fn get_map(&self) -> &HashMap<Key, Value> {
122+
&self.map
123+
}
124+
116125
pub fn get_mut(&mut self, key: &str) -> Option<&mut Value> {
117126
self.map.get_mut(key)
118127
}

0 commit comments

Comments
 (0)