spin_common/
ui.rs

1//! Functions supporting common UI behaviour and standards
2
3use std::path::Path;
4
5/// Renders a Path with double quotes. This is the standard
6/// for displaying paths in Spin. It is preferred to the Debug
7/// format because the latter doubles up backlashes on Windows.
8pub fn quoted_path(path: impl AsRef<Path>) -> impl std::fmt::Display {
9    format!("\"{}\"", path.as_ref().display())
10}