}
}
- fn locations(&self) -> Vec<&Location> {
+ fn locations(&self) -> &[Location] {
match self {
- FrameType::Visualization(visualization) => visualization.locations(),
- FrameType::Container(container) => container.locations.iter().collect(),
- FrameType::Graph(graph) => graph.locations.iter().collect(),
- FrameType::LabelFrame(label_frame) => label_frame.locations(),
- FrameType::Legend(legend) => legend.locations(),
+ FrameType::Visualization(visualization) => &visualization.locations,
+ FrameType::Container(container) => &container.locations,
+ FrameType::Graph(graph) => &graph.locations,
+ FrameType::LabelFrame(label_frame) => &label_frame.locations,
+ FrameType::Legend(legend) => &legend.locations,
}
}