rust 基础 —— Option 的 as_ref 与 as_deref
摘要:
代码: fn hello(name: &String) { println!("Name is {}", name); } fn greet(name: &str) { println!("Name is {}", name); } fn main() { let option_name: Opti 阅读全文
posted @ 2022-11-10 09:53 Lemo_wd 阅读(590) 评论(0) 推荐(0) 编辑