Skip to content

Commit f98714e

Browse files
authored
style: add blank lines between methods in DTLSConn impl (#695)
Improve code readability by adding consistent spacing between async method implementations in the Conn trait for DTLSConn.
1 parent d75542b commit f98714e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dtls/src/conn/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ impl Conn for DTLSConn {
114114
async fn connect(&self, _addr: SocketAddr) -> UtilResult<()> {
115115
Err(util::Error::Other("Not applicable".to_owned()))
116116
}
117+
117118
async fn recv(&self, buf: &mut [u8]) -> UtilResult<usize> {
118119
self.read(buf, None).await.map_err(util::Error::from_std)
119120
}
121+
120122
async fn recv_from(&self, buf: &mut [u8]) -> UtilResult<(usize, SocketAddr)> {
121123
if let Some(raddr) = self.conn.remote_addr() {
122124
let n = self.read(buf, None).await.map_err(util::Error::from_std)?;
@@ -127,18 +129,23 @@ impl Conn for DTLSConn {
127129
))
128130
}
129131
}
132+
130133
async fn send(&self, buf: &[u8]) -> UtilResult<usize> {
131134
self.write(buf, None).await.map_err(util::Error::from_std)
132135
}
136+
133137
async fn send_to(&self, _buf: &[u8], _target: SocketAddr) -> UtilResult<usize> {
134138
Err(util::Error::Other("Not applicable".to_owned()))
135139
}
140+
136141
fn local_addr(&self) -> UtilResult<SocketAddr> {
137142
self.conn.local_addr()
138143
}
144+
139145
fn remote_addr(&self) -> Option<SocketAddr> {
140146
self.conn.remote_addr()
141147
}
148+
142149
async fn close(&self) -> UtilResult<()> {
143150
self.close().await.map_err(util::Error::from_std)
144151
}

0 commit comments

Comments
 (0)