Get the path from a graph_op.
(graph_op: &GraphOp<H>)
| 551 | |
| 552 | /// Get the path from a graph_op. |
| 553 | fn get_hunk_path<H>(graph_op: &GraphOp<H>) -> Option<String> { |
| 554 | match graph_op { |
| 555 | GraphOp::FileAdd { path, .. } => Some(path.clone()), |
| 556 | GraphOp::FileDel { path, .. } => Some(path.clone()), |
| 557 | GraphOp::FileMove { path, .. } => Some(path.clone()), |
| 558 | GraphOp::FileUndel { path, .. } => Some(path.clone()), |
| 559 | GraphOp::DirAdd { path, .. } => Some(path.clone()), |
| 560 | GraphOp::DirDel { path, .. } => Some(path.clone()), |
| 561 | GraphOp::DirUndel { path, .. } => Some(path.clone()), |
| 562 | GraphOp::Edit { local, .. } => Some(local.path.clone()), |
| 563 | GraphOp::Replacement { local, .. } => Some(local.path.clone()), |
| 564 | GraphOp::SolveNameConflict { path, .. } => Some(path.clone()), |
| 565 | GraphOp::UnsolveNameConflict { path, .. } => Some(path.clone()), |
| 566 | GraphOp::SolveOrderConflict { local, .. } => Some(local.path.clone()), |
| 567 | GraphOp::UnsolveOrderConflict { local, .. } => Some(local.path.clone()), |
| 568 | GraphOp::ResurrectZombies { local, .. } => Some(local.path.clone()), |
| 569 | GraphOp::AddRoot { .. } => None, |
| 570 | GraphOp::DelRoot { .. } => None, |
| 571 | GraphOp::SetAttr { path, .. } => Some(path.clone()), |
| 572 | } |
| 573 | } |
no test coverage detected