MCPcopy Create free account
hub / github.com/Recordscript/recordscript / get_or

Function get_or

libs/hbb_common/src/config.rs:1947–1959  ·  view source on GitHub ↗
(
    a: &RwLock<HashMap<String, String>>,
    b: &HashMap<String, String>,
    c: &RwLock<HashMap<String, String>>,
    k: &str,
)

Source from the content-addressed store, hash-verified

1945
1946#[inline]
1947fn get_or(
1948 a: &RwLock<HashMap<String, String>>,
1949 b: &HashMap<String, String>,
1950 c: &RwLock<HashMap<String, String>>,
1951 k: &str,
1952) -> Option<String> {
1953 a.read()
1954 .unwrap()
1955 .get(k)
1956 .or(b.get(k))
1957 .or(c.read().unwrap().get(k))
1958 .cloned()
1959}
1960
1961#[inline]
1962fn is_option_can_save(overwrite: &RwLock<HashMap<String, String>>, k: &str) -> bool {

Callers 3

get_optionMethod · 0.85
get_flutter_optionMethod · 0.85
get_afterMethod · 0.85

Calls 2

getMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected