File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,10 @@ impl crate::Repository {
205205 /// we avoid writing duplicate objects using slow disks that will eventually have to be garbage collected.
206206 ///
207207 /// 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 > {
212209 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 > ) ?;
214212
215213 self . write_blob_stream_inner ( & buf)
216214 }
You can’t perform that action at this time.
0 commit comments