forked from mirrors/jj
copies: define CopiesTreeDiffEntry struct before stream type
I'm going to add some methods, and I don't want to insert them in between the stream type and impls.
This commit is contained in:
parent
e67aac6d5c
commit
10cbb513fa
1 changed files with 10 additions and 10 deletions
|
@ -90,6 +90,16 @@ impl CopyRecords {
|
|||
}
|
||||
}
|
||||
|
||||
/// A `TreeDiffEntry` with copy information.
|
||||
pub struct CopiesTreeDiffEntry {
|
||||
/// The source path.
|
||||
pub source: RepoPathBuf,
|
||||
/// The target path.
|
||||
pub target: RepoPathBuf,
|
||||
/// The resolved tree values if available.
|
||||
pub value: BackendResult<(MergedTreeValue, MergedTreeValue)>,
|
||||
}
|
||||
|
||||
/// Wraps a `TreeDiffStream`, adding support for copies and renames.
|
||||
pub struct CopiesTreeDiffStream<'a> {
|
||||
inner: TreeDiffStream<'a>,
|
||||
|
@ -112,16 +122,6 @@ impl<'a> CopiesTreeDiffStream<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// A `TreeDiffEntry` with copy information.
|
||||
pub struct CopiesTreeDiffEntry {
|
||||
/// The source path.
|
||||
pub source: RepoPathBuf,
|
||||
/// The target path.
|
||||
pub target: RepoPathBuf,
|
||||
/// The resolved tree values if available.
|
||||
pub value: BackendResult<(MergedTreeValue, MergedTreeValue)>,
|
||||
}
|
||||
|
||||
impl Stream for CopiesTreeDiffStream<'_> {
|
||||
type Item = CopiesTreeDiffEntry;
|
||||
|
||||
|
|
Loading…
Reference in a new issue