Skip to content

Commit

Permalink
tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage committed Feb 16, 2024
1 parent e554eb2 commit d31fbf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions quinn/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use proto::congestion::Controller;

/// In-progress connection attempt future
#[derive(Debug)]
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
pub struct Connecting {
conn: Option<ConnectionRef>,
connected: oneshot::Receiver<bool>,
Expand Down Expand Up @@ -151,16 +152,14 @@ impl Connecting {
///
/// On all non-supported platforms the local IP address will not be available,
/// and the method will return `None`.
///
/// Will panic if called after `poll` has returned `Ready`.
pub fn local_ip(&self) -> Option<IpAddr> {
let conn = self.conn.as_ref().unwrap();
let inner = conn.state.lock("local_ip");

inner.inner.local_ip()
}

/// The peer's UDP address
/// The peer's UDP address.
///
/// Will panic if called after `poll` has returned `Ready`.
pub fn remote_address(&self) -> SocketAddr {
Expand Down
2 changes: 1 addition & 1 deletion quinn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ use bytes::Bytes;
pub use proto::{
congestion, crypto, AckFrequencyConfig, ApplicationClose, Chunk, ClientConfig, ConfigError,
ConnectError, ConnectionClose, ConnectionError, EndpointConfig, IdleTimeout,
MtuDiscoveryConfig, ServerConfig, StreamId, Transmit, TransportConfig, TransportError, VarInt,
MtuDiscoveryConfig, ServerConfig, StreamId, Transmit, TransportConfig, VarInt,
};
#[cfg(feature = "tls-rustls")]
pub use rustls;
Expand Down

0 comments on commit d31fbf5

Please sign in to comment.