mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 08:53:16 +00:00
local_working_copy: remove unneeded boxing of diff stream
This commit is contained in:
parent
05fc855185
commit
8f55680787
1 changed files with 11 additions and 13 deletions
|
@ -1545,20 +1545,18 @@ impl TreeState {
|
||||||
};
|
};
|
||||||
let mut changed_file_states = Vec::new();
|
let mut changed_file_states = Vec::new();
|
||||||
let mut deleted_files = HashSet::new();
|
let mut deleted_files = HashSet::new();
|
||||||
let mut diff_stream = Box::pin(
|
let mut diff_stream = old_tree
|
||||||
old_tree
|
.diff_stream(new_tree, matcher)
|
||||||
.diff_stream(new_tree, matcher)
|
.map(|TreeDiffEntry { path, values }| async {
|
||||||
.map(|TreeDiffEntry { path, values }| async {
|
match values {
|
||||||
match values {
|
Ok((before, after)) => {
|
||||||
Ok((before, after)) => {
|
let result = materialize_tree_value(&self.store, &path, after).await;
|
||||||
let result = materialize_tree_value(&self.store, &path, after).await;
|
(path, result.map(|value| (before, value)))
|
||||||
(path, result.map(|value| (before, value)))
|
|
||||||
}
|
|
||||||
Err(err) => (path, Err(err)),
|
|
||||||
}
|
}
|
||||||
})
|
Err(err) => (path, Err(err)),
|
||||||
.buffered(self.store.concurrency().max(1)),
|
}
|
||||||
);
|
})
|
||||||
|
.buffered(self.store.concurrency().max(1));
|
||||||
while let Some((path, data)) = diff_stream.next().await {
|
while let Some((path, data)) = diff_stream.next().await {
|
||||||
let (before, after) = data?;
|
let (before, after) = data?;
|
||||||
if after.is_absent() {
|
if after.is_absent() {
|
||||||
|
|
Loading…
Reference in a new issue