A better Rust ATProto crate

caught a couple wasm bugs in CI

Orual 3a8c4185 85153488

Changed files
+10 -13
crates
jacquard-common
+1 -1
crates/jacquard-common/src/websocket.rs
··· 364 364 /// Create a new message sink 365 365 pub fn new<S>(sink: S) -> Self 366 366 where 367 - S: n0_future::Sink<WsMessage, Error = StreamError> + 'static, 367 + S: n0_future::Sink<WsMessage, Error = StreamError> + Send + 'static, 368 368 { 369 369 Self(Box::new(sink)) 370 370 }
+9 -12
crates/jacquard-common/src/xrpc/subscription.rs
··· 179 179 180 180 static DICTIONARY: OnceLock<Vec<u8>> = OnceLock::new(); 181 181 182 - let dict = DICTIONARY.get_or_init(|| { 183 - include_bytes!("../../zstd_dictionary").to_vec() 184 - }); 182 + let dict = DICTIONARY.get_or_init(|| include_bytes!("../../zstd_dictionary").to_vec()); 185 183 186 - decode_all(std::io::Cursor::new(bytes)) 187 - .or_else(|_| { 188 - // Try with dictionary 189 - let mut decoder = zstd::Decoder::with_dictionary(std::io::Cursor::new(bytes), dict)?; 190 - let mut result = Vec::new(); 191 - std::io::Read::read_to_end(&mut decoder, &mut result)?; 192 - Ok(result) 193 - }) 184 + decode_all(std::io::Cursor::new(bytes)).or_else(|_| { 185 + // Try with dictionary 186 + let mut decoder = zstd::Decoder::with_dictionary(std::io::Cursor::new(bytes), dict)?; 187 + let mut result = Vec::new(); 188 + std::io::Read::read_to_end(&mut decoder, &mut result)?; 189 + Ok(result) 190 + }) 194 191 } 195 192 196 193 /// Decode CBOR messages from a WebSocket stream ··· 752 749 where 753 750 Sub: XrpcSubscription + Send + Sync, 754 751 { 755 - let base = self.base_uri(); 752 + let base = self.base_uri().await; 756 753 self.subscription(base) 757 754 .with_options(opts) 758 755 .subscribe(params)