File tree 1 file changed +3
-5
lines changed 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,10 @@ impl crate::Repository {
205
205
/// we avoid writing duplicate objects using slow disks that will eventually have to be garbage collected.
206
206
///
207
207
/// If that is prohibitive, use the object database directly.
208
- pub fn write_blob_stream (
209
- & self ,
210
- mut bytes : impl std:: io:: Read + std:: io:: Seek ,
211
- ) -> Result < Id < ' _ > , object:: write:: Error > {
208
+ pub fn write_blob_stream ( & self , mut bytes : impl std:: io:: Read ) -> Result < Id < ' _ > , object:: write:: Error > {
212
209
let mut buf = self . empty_reusable_buffer ( ) ;
213
- std:: io:: copy ( & mut bytes, buf. deref_mut ( ) ) . expect ( "write to memory works" ) ;
210
+ std:: io:: copy ( & mut bytes, buf. deref_mut ( ) )
211
+ . map_err ( |err| Box :: new ( err) as Box < dyn std:: error:: Error + Send + Sync > ) ?;
214
212
215
213
self . write_blob_stream_inner ( & buf)
216
214
}
You can’t perform that action at this time.
0 commit comments