Skip to content

Commit 3cae751

Browse files
committed
format code
1 parent 06525ce commit 3cae751

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

sctp/src/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ pub enum Error {
210210
#[error("Stream closed")]
211211
ErrStreamClosed,
212212
#[error("Short buffer (size: {size:?}) to be filled")]
213-
ErrShortBuffer {
214-
size: usize,
215-
},
213+
ErrShortBuffer { size: usize },
216214
#[error("Io EOF")]
217215
ErrEof,
218216
#[error("Invalid SystemTime")]

sctp/src/queue/queue_test.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,11 @@ fn test_reassembly_queue_detect_buffer_too_short() -> Result<()> {
795795
let result = rq.read(&mut buf);
796796
assert!(result.is_err(), "read() should not succeed");
797797
if let Err(err) = result {
798-
assert_eq!(err, Error::ErrShortBuffer {size: 8}, "read() should not succeed");
798+
assert_eq!(
799+
err,
800+
Error::ErrShortBuffer { size: 8 },
801+
"read() should not succeed"
802+
);
799803
}
800804
assert_eq!(rq.get_num_bytes(), 0, "num bytes mismatch");
801805

sctp/src/stream/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl Stream {
195195
};
196196

197197
match result {
198-
Ok(_) | Err(Error::ErrShortBuffer {..}) => return result,
198+
Ok(_) | Err(Error::ErrShortBuffer { .. }) => return result,
199199
Err(_) => {
200200
// wait for the next chunk to become available
201201
self.read_notifier.notified().await;

0 commit comments

Comments
 (0)