警告是什么;rustdoc未使用文档注释;我的意思是,我如何修复它?
以下代码在编译时生成警告:警告是什么;rustdoc未使用文档注释;我的意思是,我如何修复它?,rust,Rust,以下代码在编译时生成警告: pub fn add_source_path(request: &mut Request) -> IronResult<Response> { /// Adds source path to the database. /// /// This function saves provided absolute path (on the server) to the database /// and goes over all jpeg fil
pub fn add_source_path(request: &mut Request) -> IronResult<Response> {
/// 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.
let params = request.get_ref::<Params>().unwrap();
let path = ¶ms["path"];
此警告的确切含义是什么以及如何修复它?以
//
开头的注释用于生成文档。这些文档注释位于它们所记录的功能之前。引述:
将文档注释放在他们正在记录的项目之前
///将源路径添加到数据库。
///
///此函数将提供的绝对路径(在服务器上)保存到数据库
///并递归地检查所有jpeg文件,以便将它们添加到DB中。
发布fn添加源路径(请求:&mut请求)->IronResult{
// ...
}
/// 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> {
// ...
}