ソースを参照

fix bfs ordering

Evan Almloff 2 年 前
コミット
abd6132c03
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/core/src/create.rs

+ 2 - 2
packages/core/src/create.rs

@@ -25,8 +25,8 @@ fn sort_bfs(paths: &[&'static [u8]]) -> Vec<(usize, &'static [u8])> {
                     }
                     }
                 }
                 }
                 // The shorter path goes first
                 // The shorter path goes first
-                (Some(_), None) => return std::cmp::Ordering::Less,
-                (None, Some(_)) => return std::cmp::Ordering::Greater,
+                (None, Some(_)) => return std::cmp::Ordering::Less,
+                (Some(_), None) => return std::cmp::Ordering::Greater,
                 (None, None) => return std::cmp::Ordering::Equal,
                 (None, None) => return std::cmp::Ordering::Equal,
             }
             }
         }
         }