Skip to content

Commit

Permalink
Size should be platform independent and 64 bit. (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatello authored Jun 17, 2024
1 parent 6e1af91 commit 6f2dd62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/s3/response/list_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ fn parse_list_objects_contents(
&content.get_child_text_or_error("LastModified")?,
)?);
let etag = content.get_child_text("ETag");
let size: Option<usize> = content
let size: Option<u64> = content
.get_child_text("Size")
.map(|x| x.parse::<usize>())
.map(|x| x.parse::<u64>())
.transpose()?;
let storage_class = content.get_child_text("StorageClass");
let is_latest = content
Expand Down
2 changes: 1 addition & 1 deletion src/s3/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub struct ListEntry {
pub etag: Option<String>, // except DeleteMarker
pub owner_id: Option<String>,
pub owner_name: Option<String>,
pub size: Option<usize>, // except DeleteMarker
pub size: Option<u64>, // except DeleteMarker
pub storage_class: Option<String>,
pub is_latest: bool, // except ListObjects V1/V2
pub version_id: Option<String>, // except ListObjects V1/V2
Expand Down

0 comments on commit 6f2dd62

Please sign in to comment.