(node: &Value)
| 1949 | } |
| 1950 | |
| 1951 | fn rect_from_node(node: &Value) -> Option<Rect> { |
| 1952 | ["frameInScreen", "frame", "bounds"] |
| 1953 | .into_iter() |
| 1954 | .filter_map(|key| node.get(key).and_then(rect_from_value)) |
| 1955 | .next() |
| 1956 | } |
| 1957 | |
| 1958 | fn rect_from_value(value: &Value) -> Option<Rect> { |
| 1959 | let object = value.as_object()?; |