(path: &Path)
| 513 | |
| 514 | #[cfg(target_os = "windows")] |
| 515 | fn convert_to_unix_path(path: &Path) -> Option<String> { |
| 516 | let mut path_str = String::new(); |
| 517 | for component in path.components() { |
| 518 | if let std::path::Component::Normal(os_str) = component { |
| 519 | if !path_str.is_empty() { |
| 520 | path_str.push('/'); |
| 521 | } |
| 522 | path_str.push_str(os_str.to_str()?); |
| 523 | } |
| 524 | } |
| 525 | Some(path_str) |
| 526 | } |
| 527 | |
| 528 | #[cfg(not(target_os = "windows"))] |
| 529 | fn convert_to_unix_path(path: &Path) -> Option<String> { |
no test coverage detected