docs: update usage and clean clippy warnings
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user