以下代码在编译时会产生警告:
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"];
Run Code Online (Sandbox Code Playgroud)
这是警告:
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"];
Run Code Online (Sandbox Code Playgroud)
这个警告到底是什么意思以及如何解决它?
以 开头的注释///用于生成文档。这些文档注释位于它们所记录的函数之前。引用Rust 编程语言:
\n\n\n将文档注释放在他们\xe2\x80\x99 正在记录的项目之前。
\n
/// Adds source path to the database.\n///\n/// This function saves provided absolute path (on the server) to the database\n/// and goes over all jpeg files recursively in order to add them to DB.\npub fn add_source_path(request: &mut Request) -> IronResult<Response> {\n // ...\n}\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
2529 次 |
| 最近记录: |