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)
| 722 | /// escape-sequence introducers (`\Users` → invalid unicode escape), so |
| 723 | /// they must be doubled. |
| 724 | fn toml_path(path: &Path) -> String { |
| 725 | path.display().to_string().replace('\\', "\\\\") |
| 726 | } |
| 727 | |
| 728 | /// Build a fake package in a tempdir: manifest + two files + a settings |
| 729 | /// manifest. Returns (pkg_dir, dst_dir) tempdirs. |
no test coverage detected