While you could use if statements to detect which enum is passed in, like so: fn get_version(lang: CodeLang) -> &'static str { if let CodeLang::Rust = lang ...
確定! 回上一頁