mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
cargo fmt
This commit is contained in:
parent
bec7bbf96c
commit
3a35cd6c8f
294 changed files with 6809 additions and 3911 deletions
|
|
@ -342,9 +342,10 @@ impl SurfaceMap {
|
|||
/// scan root or when path stripping fails.
|
||||
pub fn relative_path_string(path: &Path, scan_root: Option<&Path>) -> String {
|
||||
if let Some(root) = scan_root
|
||||
&& let Ok(rel) = path.strip_prefix(root) {
|
||||
return rel.to_string_lossy().replace('\\', "/");
|
||||
}
|
||||
&& let Ok(rel) = path.strip_prefix(root)
|
||||
{
|
||||
return rel.to_string_lossy().replace('\\', "/");
|
||||
}
|
||||
path.to_string_lossy().replace('\\', "/")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue