summaryrefslogtreecommitdiffstats
path: root/vendor/gix-odb/src/store_impls/dynamic/write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-odb/src/store_impls/dynamic/write.rs')
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/write.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/gix-odb/src/store_impls/dynamic/write.rs b/vendor/gix-odb/src/store_impls/dynamic/write.rs
index a2e40eec4..ba615f351 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/write.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/write.rs
@@ -28,16 +28,15 @@ impl<S> crate::Write for store::Handle<S>
where
S: Deref<Target = dynamic::Store> + Clone,
{
- type Error = Error;
-
- fn write_stream(&self, kind: Kind, size: u64, from: impl Read) -> Result<ObjectId, Self::Error> {
+ fn write_stream(&self, kind: Kind, size: u64, from: &mut dyn Read) -> Result<ObjectId, crate::write::Error> {
let mut snapshot = self.snapshot.borrow_mut();
Ok(match snapshot.loose_dbs.first() {
Some(ldb) => ldb.write_stream(kind, size, from)?,
None => {
let new_snapshot = self
.store
- .load_one_index(self.refresh, snapshot.marker)?
+ .load_one_index(self.refresh, snapshot.marker)
+ .map_err(Box::new)?
.expect("there is always at least one ODB, and this code runs only once for initialization");
*snapshot = new_snapshot;
snapshot.loose_dbs[0].write_stream(kind, size, from)?