Skip to content

Commit c4c5a7d

Browse files
committed
style: fix formatting
1 parent b54466e commit c4c5a7d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

nora-registry/src/ui/api.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,16 @@ pub async fn get_npm_detail(storage: &Storage, name: &str) -> PackageDetail {
728728

729729
// Sort by version (semver-like, newest first)
730730
versions.sort_by(|a, b| {
731-
let a_parts: Vec<u32> = a.version.split('.').filter_map(|s| s.parse().ok()).collect();
732-
let b_parts: Vec<u32> = b.version.split('.').filter_map(|s| s.parse().ok()).collect();
731+
let a_parts: Vec<u32> = a
732+
.version
733+
.split('.')
734+
.filter_map(|s| s.parse().ok())
735+
.collect();
736+
let b_parts: Vec<u32> = b
737+
.version
738+
.split('.')
739+
.filter_map(|s| s.parse().ok())
740+
.collect();
733741
b_parts.cmp(&a_parts)
734742
});
735743

0 commit comments

Comments
 (0)