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

Method get_id_or

libs/hbb_common/src/config.rs:897–904  ·  view source on GitHub ↗
(b: String)

Source from the content-addressed store, hash-verified

895 }
896
897 pub fn get_id_or(b: String) -> String {
898 let a = CONFIG.read().unwrap().id.clone();
899 if a.is_empty() {
900 b
901 } else {
902 a
903 }
904 }
905
906 pub fn get_options() -> HashMap<String, String> {
907 let mut res = DEFAULT_SETTINGS.read().unwrap().clone();

Callers

nothing calls this directly

Calls 3

is_emptyMethod · 0.80
cloneMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected