Skip to content

Commit 3a4421c

Browse files
committed
feat: Allow access to tree::State::buf1|2.
This allows to re-use that memory at least, making this kind of state a little more useful. Also, these fields can certainly be considered stable.
1 parent bdfa0ee commit 3a4421c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gix-diff/src/tree/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ pub trait Visit {
3636
/// The state required to run [tree-diffs](super::tree()).
3737
#[derive(Default, Clone)]
3838
pub struct State {
39-
buf1: Vec<u8>,
40-
buf2: Vec<u8>,
39+
/// A buffer for object data.
40+
pub buf1: Vec<u8>,
41+
/// Another buffer for object data.
42+
pub buf2: Vec<u8>,
4143
trees: VecDeque<TreeInfoTuple>,
4244
change_id: visit::ChangeId,
4345
}

0 commit comments

Comments
 (0)