Skip to content

Commit

Permalink
style: cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed May 3, 2024
1 parent 74e76a9 commit 1b2c42b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,13 @@ pub(crate) fn path_to_string<T: AsRef<Path>>(path: T) -> String {
let mut maybe_original = None;
if let Some(original) = path.as_ref().to_str() {
if (MAIN_SEPARATOR == '/' || !original[1..].contains(MAIN_SEPARATOR))
&& !original.ends_with('.')
&& !original.ends_with('.')
&& !original.starts_with(['.', MAIN_SEPARATOR])
&& !original.starts_with(['.', '.', MAIN_SEPARATOR])
&& !original.contains([MAIN_SEPARATOR, MAIN_SEPARATOR])
&& !original.contains([MAIN_SEPARATOR, MAIN_SEPARATOR])
&& !original.contains([MAIN_SEPARATOR, '.', MAIN_SEPARATOR])
&& !original.contains([MAIN_SEPARATOR, '.', '.', MAIN_SEPARATOR]){
&& !original.contains([MAIN_SEPARATOR, '.', '.', MAIN_SEPARATOR])
{
if original.starts_with(MAIN_SEPARATOR) {
maybe_original = Some(&original[1..]);
} else {
Expand Down

0 comments on commit 1b2c42b

Please sign in to comment.