From 377dc0f710f9395e64bf26f4d669a4f0a32036d8 Mon Sep 17 00:00:00 2001 From: Vitali Lovich Date: Thu, 22 Apr 2021 15:31:38 -0700 Subject: [PATCH] Run cargo fmt on the project --- src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f34273e..d3c7886 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -895,7 +895,11 @@ fn path_push(path: &mut String, p: &str) { if has_unix_root(p) || has_windows_root(p) { *path = p.to_string(); } else { - let dir_separator = if has_windows_root(path.as_str()) { '\\' } else { '/' }; + let dir_separator = if has_windows_root(path.as_str()) { + '\\' + } else { + '/' + }; if !path.ends_with(dir_separator) { path.push(dir_separator); @@ -911,8 +915,7 @@ fn has_unix_root(p: &str) -> bool { /// Check if the path in the given string has a windows style root fn has_windows_root(p: &str) -> bool { - p.starts_with('\\') - || p.get(1..3) == Some(":\\") + p.starts_with('\\') || p.get(1..3) == Some(":\\") } fn name_attr(