···1919pub mod dispatcher;
2020pub mod get_repo;
21212222+use std::collections::BTreeSet;
2223use std::time::Duration;
23242425use cid::Cid as RawCid;
···6162#[derive(Debug, PartialEq)]
6263pub struct RepoSnapshot {
6364 /// Sorted list of collection NSIDs present in the repository.
6464- pub collections: Vec<Nsid<'static>>,
6565+ pub collections: BTreeSet<Nsid<'static>>, // TODO btreeset
6566 /// Revision TID of the latest commit.
6667 pub rev: Tid,
6768 /// MST root CID
···8990 /// The server returned an unrecognised XRPC error code.
9091 #[error("unexpected XRPC error: {0}")]
9192 UnexpectedXrpc(String),
9393+ /// The repo is likely tiny, intentionally fall through to sync.getRepo
9494+ #[error("should getRepo because it's likely tiny")]
9595+ GetSmallRepo,
9296}
93979498/// The specific reason a repository is inaccessible.
···275279 }
276280 // Any other failure or timeout: fall through. The PDS may not implement
277281 // describeRepo, or may have a bug this endpoint doesn't hit.
278278- Ok(Err(_)) | Err(_) => {}
282282+ Ok(Err(GetCollectionsError::GetSmallRepo)) | Ok(Err(_)) | Err(_) => {}
279283 }
280284 }
281285