Convert a `regorus::Value` to a string, handling various types.
(val: ®orus::Value)
| 635 | |
| 636 | /// Convert a `regorus::Value` to a string, handling various types. |
| 637 | fn value_to_string(val: ®orus::Value) -> String { |
| 638 | match val { |
| 639 | regorus::Value::String(s) => s.to_string(), |
| 640 | regorus::Value::Undefined => String::new(), |
| 641 | other => other.to_string(), |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | /// Extract a string from a `regorus::Value` object field. |
| 646 | fn get_str(val: ®orus::Value, key: &str) -> Option<String> { |
no outgoing calls
no test coverage detected