(path: &Path)
| 1407 | } |
| 1408 | |
| 1409 | fn output_file(path: &Path) { |
| 1410 | let stdout = std::io::stdout(); |
| 1411 | let mut stdout = stdout.lock(); |
| 1412 | |
| 1413 | match File::open(path) { |
| 1414 | Ok(mut file) => { |
| 1415 | let copy = std::io::copy(&mut file, &mut stdout); |
| 1416 | if let Err(error) = copy { |
| 1417 | log::warn!( |
| 1418 | "Could not output contents of `{}`: {error:?}", |
| 1419 | path.display() |
| 1420 | ); |
| 1421 | } |
| 1422 | } |
| 1423 | Err(error) => log::warn!("File at `{}` cannot be opened: {error:?}", path.display()), |
| 1424 | }; |
| 1425 | } |
| 1426 | |
| 1427 | fn session_to_cell(is_open: bool) -> CellStruct { |
| 1428 | if is_open { |
no outgoing calls
no test coverage detected