lightweight com.atproto.sync.listReposByCollection
45
fork

Configure Feed

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

get repo info from car slice

phil 4cab27ec 93bd60ee

+5 -1
+4
src/mst/mod.rs
··· 13 13 14 14 enum SpanLen { 15 15 /// all collections are known 16 + #[allow(dead_code)] 16 17 Exactly(usize), 17 18 /// at least one gap exists 19 + #[allow(dead_code)] 18 20 AtLeast(usize), 19 21 } 20 22 ··· 36 38 /// check if any collections are present 37 39 /// 38 40 /// None if we can't be sure (we only have a gap) 41 + #[allow(dead_code)] 39 42 fn is_empty(&self) -> Option<bool> { 40 43 match self.len() { 41 44 SpanLen::AtLeast(0) => None, ··· 67 70 /// key exist -> true 68 71 /// key falls in a gap -> true (it's possible!) 69 72 /// key falls after a key without a gap after -> false (not possible!) 73 + #[allow(dead_code)] 70 74 fn may_contain(&self, k: &T) -> bool { 71 75 self.contains(k).unwrap_or(true) 72 76 }
+1 -1
src/mst/slice_tricks.rs
··· 63 63 /// whether it's possible that this span covers some NSIDs 64 64 /// 65 65 /// each NSID from the set must either be in span, or in a gap of it 66 - fn could_cover(&self, collections: &BTreeSet<Nsid<'_>>) -> bool { 66 + pub fn could_cover(&self, collections: &BTreeSet<Nsid<'_>>) -> bool { 67 67 let mut candidates = collections.iter().map(Into::<TerminatedNsid>::into); 68 68 let Some(mut candidate) = candidates.next() else { 69 69 return true; // empty set can always be covered, even by a zero-gap