我目前可以做的锈病,
// this function accepts k,v
fn foo(
k: &str, v: u8
) -> bool {
true
}
但是我不能破坏签名中的参数,
// this function accepts (k,v) tuple
fn bar(
(k: &str, v: u8) // notice the parens
) -> bool {
true
}
是否可以用不可辩驳的模式破坏元组?
// this function accepts (k,v) tuple
fn baz(
(k: &str, v: u8) // notice the parens
) -> bool {
true
}