]> Untitled Git - bdk/commit
fix(file_store): recover file offset after read
author志宇 <hello@evanlinjin.me>
Tue, 23 Jan 2024 04:32:13 +0000 (12:32 +0800)
committer志宇 <hello@evanlinjin.me>
Thu, 25 Jan 2024 08:19:42 +0000 (17:19 +0900)
commit51bd01b3dd3d68c1628d74be9dc6d0f1cf1f15fe
tree449dcb834b77ded4129546f7b7412c6b32410677
parent66dc34e75ab1ec2ae533bd540327721f6226eca1
fix(file_store): recover file offset after read

Because we use wrap the file with `BufReader` with the `EntryIter`, we
need to sync the `BufReader`'s position with the file's offset when we
drop the `EntryIter`. Therefore we have a custom drop impl for
`EntryIter`.
crates/file_store/src/entry_iter.rs
crates/file_store/src/store.rs