355 B
355 B
参考文档 https://colobu.com/rust100/
注释
// rust中的注释也是 //
函数
// `fn` <function_name> ( <input parameters> ) -> <return_type> { <body> }
fn greeting() -> &'static str {
// TODO: fix me 👇
"I'm ready to __!"
}
- greeting没有输入参数,返回一个字符串切片引用(&'static str)。