docs: update usage and clean clippy warnings

This commit is contained in:
2026-04-08 22:59:07 +08:00
parent 35539234ff
commit 1aad1afb3b
3 changed files with 48 additions and 18 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ fn normalize_threads(comments: Vec<ReviewCommentDto>) -> Vec<CommentThread> {
grouped
.into_iter()
.map(|(thread_id, mut group)| {
group.sort_by(|a, b| comment_sort_key(a).cmp(&comment_sort_key(b)));
group.sort_by_key(comment_sort_key);
let root = group.remove(0);
let file_path = root
+3 -3
View File
@@ -64,7 +64,7 @@ pub fn render_markdown(doc: &PrReviewDocument) -> String {
"- merged at: {}\n",
doc.meta.merged_at.as_deref().unwrap_or("null")
));
out.push_str("\n");
out.push('\n');
out.push_str("## Commits\n\n");
for commit in &doc.commits {
@@ -73,7 +73,7 @@ pub fn render_markdown(doc: &PrReviewDocument) -> String {
commit.short_sha, commit.title, commit.author, commit.date
));
}
out.push_str("\n");
out.push('\n');
out.push_str("## Diff Stat\n\n");
out.push_str(&format!(
@@ -86,7 +86,7 @@ pub fn render_markdown(doc: &PrReviewDocument) -> String {
file.path, file.additions, file.deletions
));
}
out.push_str("\n");
out.push('\n');
for (review_index, review) in doc.reviews.iter().enumerate() {
out.push_str(&format!(