1 #![warn(clippy::match_same_arms)]
10 let _ = match Abc::A {
13 _ => 0, //~ ERROR match arms have same body
18 (.., 3) => 42, //~ ERROR match arms have same body
24 51 => 1, //~ ERROR match arms have same body
26 52 => 2, //~ ERROR match arms have same body
32 2 => 2, //~ ERROR 2nd matched arms have same body
33 3 => 2, //~ ERROR 3rd matched arms have same body
40 #[derive(PartialEq, PartialOrd, Eq, Ord)]
41 pub enum CommandInfo {
42 BuiltIn { name: String, about: Option<String> },
43 External { name: String, path: std::path::PathBuf },
47 pub fn name(&self) -> String {
49 CommandInfo::BuiltIn { name, .. } => name.to_string(),
50 CommandInfo::External { name, .. } => name.to_string(),