From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup 1/2] restore-daemon: Module docs should use //! rather than ///!
Date: Wed, 14 Feb 2024 10:04:47 +0100 [thread overview]
Message-ID: <20240214090448.123884-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20240214090448.123884-1-m.sandoval@proxmox.com>
Otherwise they apply to the next item only. The example in the link
of the following clippy lint:
```
warning: this is an outer doc comment and does not apply to the parent module or crate
--> proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs:1:1
|
1 | ///! File-restore API running inside the restore VM
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_doc_comments
help: use an inner doc comment to document the parent module or crate
|
1 | //! File-restore API running inside the restore VM
```
suggests that
```
pub mod foo {
///! This docstring is attached to `bar` rather than `foo`.
pub fn bar() {}
}
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
proxmox-restore-daemon/src/main.rs | 2 +-
proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs | 2 +-
proxmox-restore-daemon/src/proxmox_restore_daemon/mod.rs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/proxmox-restore-daemon/src/main.rs b/proxmox-restore-daemon/src/main.rs
index f94b6c67..f9df2705 100644
--- a/proxmox-restore-daemon/src/main.rs
+++ b/proxmox-restore-daemon/src/main.rs
@@ -1,4 +1,4 @@
-///! Daemon binary to run inside a micro-VM for secure single file restore of disk images
+//! Daemon binary to run inside a micro-VM for secure single file restore of disk images
use std::fs::File;
use std::io::prelude::*;
use std::os::unix::{
diff --git a/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs b/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs
index c4e97d33..f2a0cdab 100644
--- a/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs
+++ b/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs
@@ -1,4 +1,4 @@
-///! File-restore API running inside the restore VM
+//! File-restore API running inside the restore VM
use std::ffi::OsStr;
use std::fs;
use std::os::unix::ffi::OsStrExt;
diff --git a/proxmox-restore-daemon/src/proxmox_restore_daemon/mod.rs b/proxmox-restore-daemon/src/proxmox_restore_daemon/mod.rs
index 58e2bb6e..d50c3287 100644
--- a/proxmox-restore-daemon/src/proxmox_restore_daemon/mod.rs
+++ b/proxmox-restore-daemon/src/proxmox_restore_daemon/mod.rs
@@ -1,4 +1,4 @@
-///! File restore VM related functionality
+//! File restore VM related functionality
mod api;
pub use api::*;
--
2.39.2
next prev parent reply other threads:[~2024-02-14 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 9:04 [pbs-devel] [PATCH backup 0/2] More clippy fixes Maximiliano Sandoval
2024-02-14 9:04 ` Maximiliano Sandoval [this message]
2024-02-14 9:04 ` [pbs-devel] [PATCH backup 2/2] restore-daemon: Use first() when it makes sense Maximiliano Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240214090448.123884-2-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox