Showing the changes to git-diff/src (2 of 3 files). Show all
Unified · Split
| @@ -178,6 +178,7 @@ fn catchup_rhs_with_lhs<R: visit::Record>( · 177 unmodified lines | ||
| 178 | 178 | Some(Ok(rhs)) => match lhs.filename.cmp(rhs.filename) { |
| 179 | 179 | Equal => { |
| 180 | 180 | let rhs = rhs_entries.next().transpose()?.expect("the peeked item tobe present"); |
| 181 | + delegate.pop_path_component(); | |
| 181 | 182 | handle_lhs_and_rhs_with_equal_filenames(lhs, rhs, queue, delegate)?; |
| 182 | 183 | break; |
| 183 | 184 | } |
| @@ -217,6 +218,7 @@ fn catchup_lhs_with_rhs<R: visit::Record>( · 33 unmodified lines | ||
| 217 | 218 | Some(Ok(lhs)) => match lhs.filename.cmp(rhs.filename) { |
| 218 | 219 | Equal => { |
| 219 | 220 | let lhs = lhs_entries.next().expect("the peeked item to be present")?; |
| 221 | + delegate.pop_path_component(); | |
| 220 | 222 | handle_lhs_and_rhs_with_equal_filenames(lhs, rhs, queue, delegate)?; |
| 221 | 223 | break; |
| 222 | 224 | } |
| @@ -27,9 +27,12 @@ impl<P: Clone + Default> State<P> { · 26 unmodified lines | ||
| 27 | 27 | |
| 28 | 28 | pub struct Changes<'a>(Option<immutable::TreeIter<'a>>); |
| 29 | 29 | |
| 30 | −impl<'a> From<Option<immutable::TreeIter<'a>>> for Changes<'a> { | |
| 31 | − fn from(v: Option<immutable::TreeIter<'a>>) -> Self { | |
| 32 | − Changes(v) | |
| 30 | +impl<'a, T> From<T> for Changes<'a> | |
| 31 | +where | |
| 32 | + T: Into<Option<immutable::TreeIter<'a>>>, | |
| 33 | +{ | |
| 34 | + fn from(v: T) -> Self { | |
| 35 | + Changes(v.into()) | |
| 33 | 36 | } |
| 34 | 37 | } |
| 35 | 38 | |