mirror of
https://git.proxmox.com/git/rustc
synced 2025-06-04 05:26:17 +00:00
14 lines
210 B
Rust
14 lines
210 B
Rust
// run-pass
|
|
|
|
fn foo(s: &String) -> bool {
|
|
match &**s {
|
|
"kitty" => true,
|
|
_ => false
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
assert!(foo(&"kitty".to_string()));
|
|
assert!(!foo(&"gata".to_string()));
|
|
}
|