Render a filesystem path for embedding in a TOML basic (double-quoted) string. On Windows, paths contain backslashes, which TOML treats as escape-sequence introducers (`\Users` → invalid unicode escape), so they must be doubled.
(path: &Path)
| 327 | /// escape-sequence introducers (`\Users` → invalid unicode escape), so |
| 328 | /// they must be doubled. |
| 329 | fn toml_path(path: &Path) -> String { |
| 330 | path.display().to_string().replace('\\', "\\\\") |
| 331 | } |
| 332 | |
| 333 | /// Build a fake package in a tempdir: manifest + two files + a settings |
| 334 | /// manifest. Returns (pkg_dir, dst_dir) tempdirs. |
no test coverage detected