(info: &Value)
| 4752 | } |
| 4753 | |
| 4754 | fn inspector_info_allows_uikit(info: &Value) -> bool { |
| 4755 | info.get("uikit") |
| 4756 | .and_then(|value| value.get("available")) |
| 4757 | .and_then(Value::as_bool) |
| 4758 | .unwrap_or_else(|| { |
| 4759 | let app_hierarchy_source = info |
| 4760 | .get("appHierarchy") |
| 4761 | .and_then(|value| value.get("source")) |
| 4762 | .and_then(Value::as_str) |
| 4763 | .unwrap_or(""); |
| 4764 | let snapshot_source = info.get("source").and_then(Value::as_str).unwrap_or(""); |
| 4765 | let react_native_available = info |
| 4766 | .get("reactNative") |
| 4767 | .and_then(|value| value.get("available")) |
| 4768 | .and_then(Value::as_bool) |
| 4769 | .unwrap_or(snapshot_source == SOURCE_REACT_NATIVE); |
| 4770 | let flutter_available = info |
| 4771 | .get("flutter") |
| 4772 | .and_then(|value| value.get("available")) |
| 4773 | .and_then(Value::as_bool) |
| 4774 | .unwrap_or(false); |
| 4775 | !(react_native_available |
| 4776 | || flutter_available |
| 4777 | || snapshot_source == SOURCE_NATIVE_SCRIPT |
| 4778 | || app_hierarchy_source == SOURCE_REACT_NATIVE |
| 4779 | || app_hierarchy_source == SOURCE_FLUTTER |
| 4780 | || snapshot_source == SOURCE_REACT_NATIVE |
| 4781 | || snapshot_source == SOURCE_FLUTTER) |
| 4782 | }) |
| 4783 | } |
| 4784 | |
| 4785 | fn push_unique_source(sources: &mut Vec<String>, source: &str) { |
| 4786 | if !sources.iter().any(|value| value == source) { |
no test coverage detected