lightweight com.atproto.sync.listReposByCollection
45
fork

Configure Feed

Select the types of activity you want to include in your feed.

resolve the final clippy complaint!!

why am i always so resistant against this one -- file-local helper structs are cool and good

phil 72d7b103 10a832f8

+36 -17
+36 -17
src/sync/firehose/commit_event.rs
··· 185 185 tokio::task::spawn_blocking(move || { 186 186 process_blocking( 187 187 &db, 188 - did, 189 - info, 190 - prev, 191 - rev, 192 - since, 193 - incoming_prev_data, 194 - new_mst_root_bytes, 195 - born, 196 - died, 197 - pds_host, 198 - pds_mode, 188 + ValidationState { 189 + did, 190 + info, 191 + prev, 192 + rev, 193 + since, 194 + incoming_prev_data, 195 + new_mst_root_bytes, 196 + born, 197 + died, 198 + pds_host, 199 + current_mode: pds_mode, 200 + }, 199 201 ) 200 202 }) 201 203 .await??; ··· 444 446 check_step2_blocking(db, did.clone(), rev, pds_host) 445 447 } 446 448 447 - /// Perform the storage-backed validation steps (6–9) and, if all pass, 448 - /// persist the updated `repo_prev`. 449 - /// 450 - /// `info` and `prev` are pre-loaded by [`check_step2_blocking`] (step 2). 451 - fn process_blocking( 452 - db: &DbRef, 449 + /// everything needed to ship off to the blocking step 450 + struct ValidationState { 453 451 did: Did<'static>, 454 452 info: RepoInfo, 455 453 prev: Option<RepoPrev>, ··· 461 459 died: Vec<Nsid<'static>>, 462 460 pds_host: Option<Host>, 463 461 current_mode: Sync11Mode, 462 + } 463 + 464 + /// Perform the storage-backed validation steps (6–9) and, if all pass, 465 + /// persist the updated `repo_prev`. 466 + /// 467 + /// `info` and `prev` are pre-loaded by [`check_step2_blocking`] (step 2). 468 + fn process_blocking( 469 + db: &DbRef, 470 + ValidationState { 471 + did, 472 + info, 473 + prev, 474 + rev, 475 + since, 476 + incoming_prev_data, 477 + new_mst_root_bytes, 478 + born, 479 + died, 480 + pds_host, 481 + current_mode, 482 + }: ValidationState, 464 483 ) -> crate::error::Result<()> { 465 484 if let Some(prev) = &prev { 466 485 // Step 8: `since` must match repo_prev's rev (the previous rev in the chain).