или это первый пример из учебника?
let fanout_type = match env::args().nth(2) {
Some(n) => match n.to_lowercase().as_str() { // <- тут
"hash" => FanoutType::HASH,
"round-robin" => FanoutType::LB,
"cpu" => FanoutType::CPU,
"rollover" => FanoutType::ROLLOVER,
"rnd" => FanoutType::RND,
"qm" => FanoutType::QM,
"cbpf" => FanoutType::CBPF,
"ebpf" => FanoutType::EBPF,
_ => panic!("Unsupported fanout type, use one of hash, round-robin, cpu, rollover, rnd, qm, cbpf or ebpf")
},
None => FanoutType::LB,
};