Skip to content

Commit e92cceb

Browse files
authored
Merge pull request #24 from yoshuawuyts/rm-set-length
rm set_length from req, add set_len to res
2 parents daefd59 + f9b3c12 commit e92cceb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/request.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ impl Request {
6565
self
6666
}
6767

68-
/// Set the lengths of the body.
69-
pub fn set_length(mut self, length: usize) -> Self {
70-
self.length = Some(length);
71-
self
72-
}
73-
7468
/// Set the body as a string.
7569
///
7670
/// # Mime

src/response.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ impl Response {
9797
pub fn len(&self) -> Option<usize> {
9898
self.length
9999
}
100+
101+
/// Set the length of the body stream.
102+
pub fn set_len(mut self, len: usize) -> Self {
103+
self.length = Some(len);
104+
self
105+
}
100106
}
101107

102108
impl Debug for Response {

0 commit comments

Comments
 (0)