Skip to content

Commit a7d7b60

Browse files
generatedunixname1458480625696264meta-codesync[bot]
authored andcommitted
[QuickReview][Codemod][Lint:fbsource:RUSTFIX:clippy::unnecessary_sort_by] Fix clippy::unnecessary_sort_by issues in fbcode/antlir/antlir2/antlir2_packager/make_oci_layer/src
Reviewed By: dtolnay Differential Revision: D95187355 fbshipit-source-id: 9094b375ba7320909d36b186dabe000ea7765556
1 parent 8fc53a3 commit a7d7b60

File tree

1 file changed

+1
-1
lines changed
  • antlir/antlir2/antlir2_packager/make_oci_layer/src

1 file changed

+1
-1
lines changed

antlir/antlir2/antlir2_packager/make_oci_layer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ fn main() -> Result<()> {
384384
// Write parent directories to tar with their metadata from the child layer
385385
// Sort parents so shallower paths (fewer components) come first - this ensures
386386
// we write parents before children in the tar, which helps with metadata preservation
387-
parents_to_add.sort_by(|a, b| a.components().count().cmp(&b.components().count()));
387+
parents_to_add.sort_by_key(|a| a.components().count());
388388

389389
for parent_path in parents_to_add {
390390
// Strip leading slash before joining to child layer path

0 commit comments

Comments
 (0)