You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/test_chain.rs
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,28 @@ fn vectored_read() {
133
133
}
134
134
}
135
135
136
+
#[test]
137
+
fnchain_growing_buffer(){
138
+
letmut buff = [' 'asu8;10];
139
+
letmut vec = b"wassup".to_vec();
140
+
141
+
letmut chained = (&mut buff[..]).chain_mut(&mut vec).chain_mut(Vec::new());// Required for potential overflow because remaining_mut for Vec is isize::MAX - vec.len(), but for chain_mut is usize::MAX
0 commit comments