Function
insert_opt_string
(obj: &mut serde_json::Map<String, Value>, key: &str, value: Option<String>)
Source from the content-addressed store, hash-verified
| 2327 | } |
| 2328 | |
| 2329 | fn 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 | |
| 2335 | fn insert_opt_u64(obj: &mut serde_json::Map<String, Value>, key: &str, value: Option<u64>) { |
| 2336 | if let Some(value) = value { |
Tested by
no test coverage detected