MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / check_variant

Function check_variant

atomic-cli/src/commands/view/mod.rs:245–255  ·  view source on GitHub ↗

Ensure all variants exist and can be matched

(cmd: &ViewCommands)

Source from the content-addressed store, hash-verified

243 fn test_view_commands_variants() {
244 // Ensure all variants exist and can be matched
245 fn check_variant(cmd: &ViewCommands) -> &'static str {
246 match cmd {
247 ViewCommands::Create(_) => "create",
248 ViewCommands::Split(_) => "split",
249 ViewCommands::Switch(_) => "switch",
250 ViewCommands::Delete(_) => "delete",
251 ViewCommands::List(_) => "list",
252 ViewCommands::Show(_) => "show",
253 ViewCommands::Promote(_) => "promote",
254 }
255 }
256
257 // Create instances of each variant
258 let new = New::default();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected