summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ripple/fossil/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs
index 85943f0..6420437 100644
--- a/ripple/fossil/src/lib.rs
+++ b/ripple/fossil/src/lib.rs
@@ -294,7 +294,8 @@ impl Store {
 			})
 			.collect();
 
-		Some(Blob(bao::decode::Decoder::new_outboard(
+		// the decoder is almost 3k in size, so boxing it seems preferable
+		Some(Blob(Box::new(bao::decode::Decoder::new_outboard(
 			RawBlob {
 				store: self,
 				chunks,
@@ -303,11 +304,11 @@ impl Store {
 			},
 			io::Cursor::new(bao_inline),
 			&ident,
-		)))
+		))))
 	}
 }
 
-pub struct Blob<'a>(bao::decode::Decoder<RawBlob<'a>, std::io::Cursor<Vec<u8>>>);
+pub struct Blob<'a>(Box<bao::decode::Decoder<RawBlob<'a>, std::io::Cursor<Vec<u8>>>>);
 
 impl io::Read for Blob<'_> {
 	fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {