Skip to content

Commit 90735b3

Browse files
committed
fix clippy lint
1 parent c6933bf commit 90735b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/content/content_length.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub struct ContentLength {
3030
length: usize,
3131
}
3232

33+
#[allow(clippy::len_without_is_empty)]
3334
impl ContentLength {
3435
/// Create a new instance of `Authorization`.
3536
pub fn new(length: usize) -> Self {
@@ -72,6 +73,11 @@ impl ContentLength {
7273
pub fn len(&self) -> usize {
7374
self.length
7475
}
76+
77+
/// Set the content length.
78+
pub fn set_len(&mut self, len: usize) {
79+
self.length = len;
80+
}
7581
}
7682

7783
#[cfg(test)]

0 commit comments

Comments
 (0)