Skip to content

Commit 80a105d

Browse files
author
fossdd
committed
Update pijul
1 parent 3cef0fa commit 80a105d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libpijul/src/unrecord/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ pub fn unrecord<T: MutTxnT, P: ChangeStore>(
6969
hash: &Hash,
7070
salt: u64,
7171
) -> Result<bool, UnrecordError<P::Error, T>> {
72-
let change = changes
73-
.get_change(hash)
74-
.map_err(UnrecordError::Changestore)?;
7572
let change_id = if let Some(&h) = txn.get_internal(&hash.into())? {
7673
h
7774
} else {
@@ -82,6 +79,10 @@ pub fn unrecord<T: MutTxnT, P: ChangeStore>(
8279

8380
del_channel_changes::<T, P>(txn, &mut channel, change_id)?;
8481

82+
let change = changes
83+
.get_change(hash)
84+
.map_err(UnrecordError::Changestore)?;
85+
8586
unapply(txn, &mut channel, changes, change_id, &change, salt)?;
8687

8788
if unused {

0 commit comments

Comments
 (0)