Skip to content

Commit f1111c8

Browse files
authored
Fix calling of write commands (taking a read lease) (#224)
1 parent 6e858d7 commit f1111c8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/hiffy/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,14 @@ pub fn hiffy_call(
294294
}
295295
ops.push(Op::Done);
296296

297-
let mut results = context.run(core, ops.as_slice(), None)?;
297+
let data = lease.as_ref().and_then(|lease| {
298+
if let HiffyLease::Write(d) = *lease {
299+
Some(d)
300+
} else {
301+
None
302+
}
303+
});
304+
let mut results = context.run(core, ops.as_slice(), data)?;
298305

299306
if results.len() != 1 {
300307
bail!("unexpected results length: {:?}", results);

0 commit comments

Comments
 (0)