1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
//! # Base Syntax //! //! `base_syntax` 是一个使得特定计算更方便的 //! 工具集合 /// 将给定的数字加一。 // --snip-- /// 将给定的数字加一 /// /// # Examples /// /// ``` /// let arg = 5; /// let answer = base_syntax::add_one(arg); /// /// assert_eq!(6, answer); /// ``` pub fn add_one(x: i32) -> i32{ x + 1 }