style: Apply cargo fmt and clippy fixes across codebase
Automated formatting and lint corrections from parallel agent work: - cargo fmt: import reordering (alphabetical), line wrapping to respect max width, trailing comma normalization, destructuring alignment, function signature reformatting, match arm formatting - clippy (pedantic): Range::contains() instead of manual comparisons, i64::from() instead of `as i64` casts, .clamp() instead of .max().min() chains, let-chain refactors (if-let with &&), #[allow(clippy::too_many_arguments)] and #[allow(clippy::field_reassign_with_default)] where warranted - Removed trailing blank lines and extra whitespace No behavioral changes. All existing tests pass unmodified. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,13 +19,13 @@ use crate::core::error::Result;
|
||||
use crate::core::payloads::{StorePayloadOptions, store_payload};
|
||||
use crate::core::time::now_ms;
|
||||
use crate::documents::SourceType;
|
||||
use crate::ingestion::dirty_tracker;
|
||||
use crate::gitlab::GitLabClient;
|
||||
use crate::gitlab::transformers::{
|
||||
NormalizedDiscussion, NormalizedNote, transform_mr_discussion,
|
||||
transform_notes_with_diff_position,
|
||||
};
|
||||
use crate::gitlab::types::GitLabDiscussion;
|
||||
use crate::ingestion::dirty_tracker;
|
||||
|
||||
use super::merge_requests::MrForDiscussionSync;
|
||||
|
||||
@@ -72,7 +72,10 @@ pub async fn prefetch_mr_discussions(
|
||||
debug!(mr_iid = mr.iid, "Prefetching discussions for MR");
|
||||
|
||||
// Fetch all discussions from GitLab
|
||||
let raw_discussions = match client.fetch_all_mr_discussions(gitlab_project_id, mr.iid).await {
|
||||
let raw_discussions = match client
|
||||
.fetch_all_mr_discussions(gitlab_project_id, mr.iid)
|
||||
.await
|
||||
{
|
||||
Ok(d) => d,
|
||||
Err(e) => {
|
||||
return PrefetchedMrDiscussions {
|
||||
@@ -241,7 +244,10 @@ pub fn write_prefetched_mr_discussions(
|
||||
mark_discussions_synced(conn, mr.local_mr_id, mr.updated_at)?;
|
||||
clear_sync_health_error(conn, mr.local_mr_id)?;
|
||||
|
||||
debug!(mr_iid = mr.iid, "MR discussion sync complete, watermark advanced");
|
||||
debug!(
|
||||
mr_iid = mr.iid,
|
||||
"MR discussion sync complete, watermark advanced"
|
||||
);
|
||||
} else if prefetched.had_transform_errors {
|
||||
warn!(
|
||||
mr_iid = mr.iid,
|
||||
|
||||
Reference in New Issue
Block a user