mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-11-29 06:00:28 +08:00
surf: Open Diff to custom construction
Put the Diff type in lines with its associated types by opening it up to construction by crate consumers. The existing associated types have all their fields public. Open construction up by making the `Diff::insert_*` methods public and updating the Diff's stats manually. `Diff::stat` correctness is covered by existing tests.
This commit is contained in:
@@ -229,7 +229,6 @@ impl<'a> TryFrom<git2::Diff<'a>> for Diff {
|
||||
use git2::Delta;
|
||||
|
||||
let mut diff = Diff::new();
|
||||
diff.stats = git_diff.stats()?.into();
|
||||
|
||||
for (idx, delta) in git_diff.deltas().enumerate() {
|
||||
match delta.status() {
|
||||
|
||||
Reference in New Issue
Block a user