We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 735a0d8 commit 6dcb8b6Copy full SHA for 6dcb8b6
stun/src/client.rs
@@ -394,11 +394,7 @@ impl Client {
394
self.handler_tx = Some(Arc::clone(&handler_tx));
395
self.close_tx = Some(close_tx);
396
397
- let conn = if let Some(conn) = &self.settings.c {
398
- Arc::clone(conn)
399
- } else {
400
- return Err(Error::ErrNoConnection);
401
- };
+ let conn = self.settings.c.clone().ok_or(Error::ErrNoConnection)?;
402
403
Client::start(
404
self.settings.c.clone(),
0 commit comments