()
| 14 | |
| 15 | impl ResponsiveLayout { |
| 16 | pub fn new() -> Self { |
| 17 | Self { |
| 18 | breakpoints: vec![ |
| 19 | (600.0, Breakpoint::Small), |
| 20 | (960.0, Breakpoint::Medium), |
| 21 | (1280.0, Breakpoint::Large), |
| 22 | (f32::MAX, Breakpoint::XLarge), |
| 23 | ], |
| 24 | current: Breakpoint::Medium, |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | pub fn get_layout<'a, T>(&self, layouts: &'a [(Breakpoint, T)]) -> Option<&'a T> { |
| 29 | layouts.iter() |
nothing calls this directly
no outgoing calls
no test coverage detected