@@ -1485,19 +1485,9 @@ impl DbConnection {{
14851485 /// This is a low-level primitive exposed for power users who need significant control over scheduling.
14861486 /// Most applications should call [`Self::run_threaded`] to spawn a thread
14871487 /// which advances the connection automatically.
1488- ///
1489- /// # Panics
1490- /// At runtime if called on any `wasm32` target.
1488+ #[cfg(not(target_arch = \" wasm32\" ))]
14911489 pub fn advance_one_message_blocking(&self) -> __sdk::Result<()> {{
1492- #[cfg(target_arch = \" wasm32\" )]
1493- {{
1494- panic!(\" `DbConnection::advance_one_message_blocking` is not supported on WebAssembly (wasm32); \\
1495- prefer using `advance_one_message` or `advance_one_message_async` instead\" );
1496- }}
1497- #[cfg(not(target_arch = \" wasm32\" ))]
1498- {{
1499- self.imp.advance_one_message_blocking()
1500- }}
1490+ self.imp.advance_one_message_blocking()
15011491 }}
15021492
15031493 /// Process one WebSocket message, `await`ing until one is received.
@@ -1521,35 +1511,15 @@ impl DbConnection {{
15211511 }}
15221512
15231513 /// Spawn a thread which processes WebSocket messages as they are received.
1524- ///
1525- /// # Panics
1526- /// At runtime if called on any `wasm32` target.
1514+ #[cfg(not(target_arch = \" wasm32\" ))]
15271515 pub fn run_threaded(&self) -> std::thread::JoinHandle<()> {{
1528- #[cfg(target_arch = \" wasm32\" )]
1529- {{
1530- panic!(\" `DbConnection::run_threaded` is not supported on WebAssembly (wasm32); \\
1531- prefer using `DbConnection::run_background` instead\" );
1532- }}
1533- #[cfg(not(target_arch = \" wasm32\" ))]
1534- {{
1535- self.imp.run_threaded()
1536- }}
1516+ self.imp.run_threaded()
15371517 }}
15381518
1539- /// Spawn a task which processes WebSocket messages as they are received.
1540- ///
1541- /// # Panics
1542- /// At runtime if called on any non-`wasm32` target.
1519+ /// Spawn a background task which processes WebSocket messages as they are received.
1520+ #[cfg(target_arch = \" wasm32\" )]
15431521 pub fn run_background(&self) {{
1544- #[cfg(not(target_arch = \" wasm32\" ))]
1545- {{
1546- panic!(\" `DbConnection::run_background` is only supported on WebAssembly (wasm32); \\
1547- prefer using `DbConnection::run_threaded` instead\" );
1548- }}
1549- #[cfg(target_arch = \" wasm32\" )]
1550- {{
1551- self.imp.run_background()
1552- }}
1522+ self.imp.run_background()
15531523 }}
15541524
15551525 /// Run an `async` loop which processes WebSocket messages when polled.
0 commit comments