Skip to content

Commit dea7bf0

Browse files
committed
feat: removed function to calculate len unchecked chunked body
1 parent 50ba02e commit dea7bf0

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

body-plz/src/variants/chunked.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ pub fn total_chunk_size(chunks: &[ChunkType]) -> usize {
4444
})
4545
}
4646

47-
pub fn total_chunk_size_unchecked(chunks: &[ChunkType]) -> usize {
48-
chunks.iter().fold(0, |acc, chunk| acc + chunk.len())
49-
}
50-
5147
#[cfg(test)]
5248
mod tests {
5349
use buffer_plz::Cursor;
@@ -96,23 +92,6 @@ mod tests {
9692
assert_eq!(total_chunk_size(&vec_body), 40);
9793
}
9894

99-
#[test]
100-
fn test_total_chunk_size_unchecked() {
101-
let data = "7; hola amigo\r\n\
102-
Mozilla\r\n\
103-
9\r\n\
104-
Developer\r\n\
105-
7\r\n\
106-
Network\r\n\
107-
0\r\n\
108-
a: b\r\n\
109-
c: d\r\n\
110-
\r\n";
111-
let chunk_vec = parse_chunked_body(data, true);
112-
let size = total_chunk_size_unchecked(&chunk_vec);
113-
assert_eq!(size, 67);
114-
}
115-
11695
#[test]
11796
fn test_chunk_into_data() {
11897
let data = "7; hola amigo\r\n\

0 commit comments

Comments
 (0)