📜  生锈警告:未使用的文档注释 - 生锈代码示例

📅  最后修改于: 2022-03-11 14:49:25.654000             🧑  作者: Mango

代码示例1
Comments starting with /// are used to generate documentation. Those documentation comments go before the function they document. Quoting The Rust Programming Language:

Place documentation comments just before the item they’re documenting.

/// Adds source path to the database.
///
/// This function saves provided absolute path (on the server) to the database
/// and goes over all jpeg files recursively in order to add them to DB.
pub fn add_source_path(request: &mut Request) -> IronResult {
    // ...
}