Accepts only the fixed classification codes; anything else is refused so no free-form text can enter telemetry.
(code: &str)
| 186 | /// Accepts only the fixed classification codes; anything else is |
| 187 | /// refused so no free-form text can enter telemetry. |
| 188 | pub fn from_code(code: &str) -> Option<Self> { |
| 189 | match code { |
| 190 | "neither" => Some(Self::Neither), |
| 191 | "git_to_atomic" => Some(Self::GitToAtomic), |
| 192 | "atomic_to_git" => Some(Self::AtomicToGit), |
| 193 | "diverged" => Some(Self::Diverged), |
| 194 | "unknown" => Some(Self::Unknown), |
| 195 | _ => None, |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /// Workspace-transaction mode code (closed code set). |
nothing calls this directly
no outgoing calls
no test coverage detected