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

Configure Feed

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

thanks clippy

+8 -2
+7 -1
jetstream/src/error.rs
··· 26 26 #[error("failed to construct url: {0}")] 27 27 InvalidEndpointUri(#[from] tokio_tungstenite::tungstenite::http::uri::InvalidUri), 28 28 #[error("failed to connect to Jetstream instance: {0}")] 29 - WebSocketFailure(#[from] tokio_tungstenite::tungstenite::Error), 29 + WebSocketFailure(Box<tokio_tungstenite::tungstenite::Error>), 30 30 #[error("the Jetstream config is invalid (this really should not happen here): {0}")] 31 31 InvalidConfig(#[from] ConfigValidationError), 32 + } 33 + 34 + impl From<tokio_tungstenite::tungstenite::Error> for ConnectionError { 35 + fn from(e: tokio_tungstenite::tungstenite::Error) -> Self { 36 + Self::WebSocketFailure(Box::new(e)) 37 + } 32 38 } 33 39 34 40 /// Possible errors that can occur when receiving events from a Jetstream instance over WebSockets.
+1 -1
ufos/src/bin/analyze.rs
··· 138 138 } 139 139 let total_parents = parent_counts.len(); 140 140 let mut sorted: Vec<_> = parent_counts.into_iter().collect(); 141 - sorted.sort_by(|a, b| b.1.cmp(&a.1)); 141 + sorted.sort_by_key(|c| std::cmp::Reverse(c.1)); 142 142 let top: Vec<String> = sorted 143 143 .iter() 144 144 .take(5)