diff mbox series

[libgpiod,v2,2/3] bindings: rust: libgpiod: turn standalone doc comment into normal comment

Message ID 20250103-lifetime-fix-v2-2-63902dc8cae1@linaro.org
State New
Headers show
Series bindings: rust: fix some compiler + clippy warnings | expand

Commit Message

Erik Schilling Jan. 3, 2025, 3 p.m. UTC
This was complained about by clippy:

    warning: empty line after doc comment
       --> libgpiod/src/lib.rs:461:1
        |
    461 | / /// Various libgpiod-related functions.
    462 | |
        | |_
    ...
    467 |   pub fn is_gpiochip_device<P: AsRef<Path>>(path: &P) -> bool {
        |   ----------------------------------------------------------- the comment documents this function
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
        = help: if the empty line is unintentional remove it
    help: if the documentation should include the empty line include it in the comment
        |
    462 | ///
        |

The comment more seems to be of structural matter and should not be tied
to the function immediately below it. So lets turn it into a normal
non-doc comment.

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
---
 bindings/rust/libgpiod/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bindings/rust/libgpiod/src/lib.rs b/bindings/rust/libgpiod/src/lib.rs
index fd95ed2ac3fe0bac2042ca58f66263408013457c..c03831bce62b287c08804e2d9d96aea7320dec7c 100644
--- a/bindings/rust/libgpiod/src/lib.rs
+++ b/bindings/rust/libgpiod/src/lib.rs
@@ -454,15 +454,15 @@  pub mod line {
                 GPIOD_EDGE_EVENT_FALLING_EDGE => EdgeKind::Falling,
                 _ => return Err(Error::InvalidEnumValue("EdgeEvent", kind as i32)),
             })
         }
     }
 }
 
-/// Various libgpiod-related functions.
+// Various libgpiod-related functions.
 
 /// Check if the file pointed to by path is a GPIO chip character device.
 ///
 /// Returns true if the file exists and is a GPIO chip character device or a
 /// symbolic link to it.
 pub fn is_gpiochip_device<P: AsRef<Path>>(path: &P) -> bool {
     // Null-terminate the string