mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-09-09 01:27:27 +08:00
refactor: 消除 sort_by 的 clippy unnecessary_sort_by 警告
This commit is contained in:
@@ -67,7 +67,7 @@ impl ChapterSegments {
|
|||||||
// 遍历完所有现有片段并处理完所有重叠后,将新的片段添加到结果列表中
|
// 遍历完所有现有片段并处理完所有重叠后,将新的片段添加到结果列表中
|
||||||
processed_segments.push(new_segment);
|
processed_segments.push(new_segment);
|
||||||
|
|
||||||
processed_segments.sort_by(|a, b| a.start.cmp(&b.start));
|
processed_segments.sort_by_key(|a| a.start);
|
||||||
|
|
||||||
self.segments = processed_segments;
|
self.segments = processed_segments;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user