Count the number of atoms in this graph_op.
(&self)
| 831 | |
| 832 | /// Count the number of atoms in this graph_op. |
| 833 | pub fn atom_count(&self) -> usize { |
| 834 | match self { |
| 835 | GraphOp::FileAdd { |
| 836 | contents: Some(_), .. |
| 837 | } => 3, |
| 838 | GraphOp::FileAdd { contents: None, .. } => 2, |
| 839 | GraphOp::FileDel { |
| 840 | contents: Some(_), .. |
| 841 | } => 2, |
| 842 | GraphOp::FileDel { contents: None, .. } => 1, |
| 843 | GraphOp::FileUndel { |
| 844 | contents: Some(_), .. |
| 845 | } => 2, |
| 846 | GraphOp::FileUndel { contents: None, .. } => 1, |
| 847 | GraphOp::FileMove { .. } => 2, |
| 848 | GraphOp::Edit { .. } => 1, |
| 849 | GraphOp::Replacement { .. } => 2, |
| 850 | GraphOp::SolveNameConflict { .. } => 1, |
| 851 | GraphOp::UnsolveNameConflict { .. } => 1, |
| 852 | GraphOp::SolveOrderConflict { .. } => 1, |
| 853 | GraphOp::UnsolveOrderConflict { .. } => 1, |
| 854 | GraphOp::ResurrectZombies { .. } => 1, |
| 855 | GraphOp::AddRoot { .. } => 2, |
| 856 | GraphOp::DelRoot { .. } => 2, |
| 857 | GraphOp::DirAdd { .. } => 2, |
| 858 | GraphOp::DirDel { .. } => 1, |
| 859 | GraphOp::DirUndel { .. } => 1, |
| 860 | GraphOp::SetAttr { .. } => 0, |
| 861 | } |
| 862 | } |
| 863 | } |
| 864 | |
| 865 | #[cfg(test)] |
nothing calls this directly
no outgoing calls
no test coverage detected