Try to read a squid configuration file, warning on failure.
(path: &Path)
| 560 | |
| 561 | /// Try to read a squid configuration file, warning on failure. |
| 562 | fn try_read_squid_conf(path: &Path) -> Option<String> { |
| 563 | match std::fs::read_to_string(path) { |
| 564 | Ok(content) => Some(content), |
| 565 | Err(e) => { |
| 566 | eprintln!( |
| 567 | "Warning: Failed to read squid_conf_path '{}': {e}", |
| 568 | path.display() |
| 569 | ); |
| 570 | None |
| 571 | } |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | /// Expand leading `~` or `~/` in a path string to the user's home directory. |
| 576 | fn expand_tilde(path: &str) -> PathBuf { |
no outgoing calls
no test coverage detected