MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / insert_opt_string

Function insert_opt_string

crates/opencode-provider/src/responses.rs:2329–2333  ·  view source on GitHub ↗
(obj: &mut serde_json::Map<String, Value>, key: &str, value: Option<String>)

Source from the content-addressed store, hash-verified

2327}
2328
2329fn insert_opt_string(obj: &mut serde_json::Map<String, Value>, key: &str, value: Option<String>) {
2330 if let Some(value) = value {
2331 obj.insert(key.to_string(), Value::String(value));
2332 }
2333}
2334
2335fn insert_opt_u64(obj: &mut serde_json::Map<String, Value>, key: &str, value: Option<u64>) {
2336 if let Some(value) = value {

Callers 1

get_argsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected