Answers for "rust warning: unused doc comment"

1

rust warning: unused doc comment

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<Response> {
    // ...
}
Posted by: Guest on September-03-2021

Browse Popular Code Answers by Language