summaryrefslogtreecommitdiffstats
path: root/vendor/gix-object/src/tree
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-object/src/tree')
-rw-r--r--vendor/gix-object/src/tree/write.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/gix-object/src/tree/write.rs b/vendor/gix-object/src/tree/write.rs
index 91e1dc2e0..e1a82720f 100644
--- a/vendor/gix-object/src/tree/write.rs
+++ b/vendor/gix-object/src/tree/write.rs
@@ -57,10 +57,12 @@ impl crate::WriteTo for Tree {
Kind::Tree
}
- fn size(&self) -> usize {
+ fn size(&self) -> u64 {
self.entries
.iter()
- .map(|Entry { mode, filename, oid }| mode.as_bytes().len() + 1 + filename.len() + 1 + oid.as_bytes().len())
+ .map(|Entry { mode, filename, oid }| {
+ (mode.as_bytes().len() + 1 + filename.len() + 1 + oid.as_bytes().len()) as u64
+ })
.sum()
}
}
@@ -100,11 +102,11 @@ impl<'a> crate::WriteTo for TreeRef<'a> {
Kind::Tree
}
- fn size(&self) -> usize {
+ fn size(&self) -> u64 {
self.entries
.iter()
.map(|EntryRef { mode, filename, oid }| {
- mode.as_bytes().len() + 1 + filename.len() + 1 + oid.as_bytes().len()
+ (mode.as_bytes().len() + 1 + filename.len() + 1 + oid.as_bytes().len()) as u64
})
.sum()
}