()
| 112 | |
| 113 | impl Display { |
| 114 | pub fn primary() -> io::Result<Display> { |
| 115 | let mut size = SCREEN_SIZE.lock().unwrap(); |
| 116 | if size.0 == 0 || size.1 == 0 { |
| 117 | *size = get_size().unwrap_or_default(); |
| 118 | } |
| 119 | Ok(Display { |
| 120 | default: true, |
| 121 | rect: Rect { |
| 122 | x: 0, |
| 123 | y: 0, |
| 124 | w: size.0, |
| 125 | h: size.1, |
| 126 | }, |
| 127 | }) |
| 128 | } |
| 129 | |
| 130 | pub fn all() -> io::Result<Vec<Display>> { |
| 131 | Ok(vec![Display::primary()?]) |
nothing calls this directly
no test coverage detected