Skip to content

Commit 06525ce

Browse files
committed
rename max to size
1 parent d0afddc commit 06525ce

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

sctp/src/association/association_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ async fn test_assoc_reliable_short_buffer() -> Result<()> {
744744
if let Err(err) = result {
745745
assert_eq!(
746746
err,
747-
Error::ErrShortBuffer { max: 3 },
747+
Error::ErrShortBuffer { size: 3 },
748748
"expected error to be ErrShortBuffer"
749749
);
750750
}

sctp/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ pub enum Error {
209209
ErrOutboundPacketTooLarge,
210210
#[error("Stream closed")]
211211
ErrStreamClosed,
212-
#[error("Short buffer to be filled (max: {max:?})")]
212+
#[error("Short buffer (size: {size:?}) to be filled")]
213213
ErrShortBuffer {
214-
max: usize,
214+
size: usize,
215215
},
216216
#[error("Io EOF")]
217217
ErrEof,

sctp/src/queue/queue_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ 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 {max: 8}, "read() should not succeed");
798+
assert_eq!(err, Error::ErrShortBuffer {size: 8}, "read() should not succeed");
799799
}
800800
assert_eq!(rq.get_num_bytes(), 0, "num bytes mismatch");
801801

sctp/src/queue/reassembly_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl ReassemblyQueue {
286286
buf[n_written..n_written + n].copy_from_slice(&c.user_data[..n]);
287287
n_written += n;
288288
if n < to_copy {
289-
err = Some(Error::ErrShortBuffer { max: buf.len() });
289+
err = Some(Error::ErrShortBuffer { size: buf.len() });
290290
}
291291
}
292292
}

0 commit comments

Comments
 (0)