rust/hg-core/src/dirstate_tree/dirstate_map.rs
changeset 49134 8c59d8adcf5b
parent 49133 23a5659125c8
child 49136 3f5e207f78be
equal deleted inserted replaced
49133:23a5659125c8 49134:8c59d8adcf5b
  1335                 key,
  1335                 key,
  1336                 |_ancestor| {},
  1336                 |_ancestor| {},
  1337             )?
  1337             )?
  1338             .and_then(|node| {
  1338             .and_then(|node| {
  1339                 if let Some(source) = &node.copy_source {
  1339                 if let Some(source) = &node.copy_source {
  1340                     *count -= 1;
  1340                     *count = count
       
  1341                         .checked_sub(1)
       
  1342                         .expect("nodes_with_copy_source_count should be >= 0");
  1341                     DirstateMap::count_dropped_path(unreachable_bytes, source);
  1343                     DirstateMap::count_dropped_path(unreachable_bytes, source);
  1342                 }
  1344                 }
  1343                 node.copy_source.take().map(Cow::into_owned)
  1345                 node.copy_source.take().map(Cow::into_owned)
  1344             }))
  1346             }))
  1345         })
  1347         })