Skip to content

Commit e96a1ee

Browse files
committed
content-length should be u64
1 parent 90735b3 commit e96a1ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/content_length.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::headers::{HeaderName, HeaderValue, Headers, CONTENT_LENGTH};
22
use crate::Status;
33

4-
/// Credentials to authenticate a user agent with a server.
4+
/// The size of the entity-body, in bytes, sent to the recipient.
55
///
66
/// # Specifications
77
///
@@ -27,13 +27,13 @@ use crate::Status;
2727
/// ```
2828
#[derive(Debug)]
2929
pub struct ContentLength {
30-
length: usize,
30+
length: u64,
3131
}
3232

3333
#[allow(clippy::len_without_is_empty)]
3434
impl ContentLength {
35-
/// Create a new instance of `Authorization`.
36-
pub fn new(length: usize) -> Self {
35+
/// Create a new instance.
36+
pub fn new(length: u64) -> Self {
3737
Self { length }
3838
}
3939

@@ -70,12 +70,12 @@ impl ContentLength {
7070
}
7171

7272
/// Get the content length.
73-
pub fn len(&self) -> usize {
73+
pub fn len(&self) -> u64 {
7474
self.length
7575
}
7676

7777
/// Set the content length.
78-
pub fn set_len(&mut self, len: usize) {
78+
pub fn set_len(&mut self, len: u64) {
7979
self.length = len;
8080
}
8181
}

0 commit comments

Comments
 (0)