(&self, path: &Path)
| 312 | |
| 313 | impl Compression { |
| 314 | fn open_reader(&self, path: &Path) -> std::io::Result<Box<dyn std::io::Read>> { |
| 315 | let file = std::fs::File::open(path)?; |
| 316 | match self { |
| 317 | Self::None => Ok(Box::new(std::io::BufReader::new(file))), |
| 318 | Self::Gz => Ok(Box::new(flate2::read::GzDecoder::new(file))), |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | enum PathKind { |
no outgoing calls
no test coverage detected