Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0
fork

Configure Feed

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

at spacedust-backfill 24 lines 753 B view raw
1#![no_main] 2 3// use jetstream::exports::Did; 4use ufos::db_types::DbBytes; 5use ufos::store_types::EstimatedDidsValue; 6use libfuzzer_sys::fuzz_target; 7 8#[cfg(not(target_env = "msvc"))] 9use tikv_jemallocator::Jemalloc; 10 11#[cfg(not(target_env = "msvc"))] 12#[global_allocator] 13static GLOBAL: Jemalloc = Jemalloc; 14 15fuzz_target!(|data: &[u8]| { 16 if let Ok((counts_value, n)) = EstimatedDidsValue::from_db_bytes(data) { 17 assert!(n <= data.len()); 18 let serialized = counts_value.to_db_bytes().unwrap(); 19 assert_eq!(serialized.len(), n); 20 let (and_back, n_again) = EstimatedDidsValue::from_db_bytes(&serialized).unwrap(); 21 assert_eq!(n_again, n); 22 assert_eq!(and_back.0.estimate(), counts_value.0.estimate()); 23 } 24});