]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix clippy warnings doc_overindented_list_items
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 3 Apr 2025 11:40:39 +0000 (13:40 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 4 Apr 2025 00:35:16 +0000 (02:35 +0200)
warning: doc list item overindented
   --> src/nfs/rpc_records.rs:284:5
    |
284 | ///           type: bool
    |     ^^^^^^^^^^ help: try using `  ` (2 spaces)
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
    = note: `#[warn(clippy::doc_overindented_list_items)]` on by default

rust/src/dcerpc/dcerpc.rs
rust/src/dcerpc/dcerpc_udp.rs
rust/src/detect/requires.rs
rust/src/nfs/rpc_records.rs

index 796c0821b2e486463053b367c60dd3fbaf34e128..acc1f10d0658636712b10437bb76cceda18cf11a 100644 (file)
@@ -454,9 +454,7 @@ impl DCERPCState {
     /// parser in C. This requires an internal transaction ID to be maintained.
     ///
     /// Arguments:
-    /// * `tx_id`:
-    ///           type: unsigned 32 bit integer
-    ///    description: internal transaction ID to track transactions
+    /// * `tx_id`: internal transaction ID to track transactions
     ///
     /// Return value:
     /// Option mutable reference to DCERPCTransaction
@@ -474,12 +472,8 @@ impl DCERPCState {
     /// found, create one.
     ///
     /// Arguments:
-    /// * `call_id`:
-    ///             type: unsigned 32 bit integer
-    ///      description: call_id param derived from TCP Header
-    /// * `dir`:
-    ///         type: enum Direction
-    ///   description: direction of the flow
+    /// * `call_id`: call_id param derived from TCP Header
+    /// * `dir`: direction of the flow
     ///
     /// Return value:
     /// Option mutable reference to DCERPCTransaction
@@ -567,15 +561,14 @@ impl DCERPCState {
     /// Makes a call to the nom parser for parsing DCERPC Header.
     ///
     /// Arguments:
-    /// * `input`:
-    ///           type: u8 vector slice.
-    ///    description: bytes from the beginning of the buffer.
+    /// * `input`: bytes from the beginning of the buffer.
     ///
     /// Return value:
     /// * Success: Number of bytes successfully parsed.
-    /// * Failure: -1 in case of Incomplete data or Eof.
-    ///            -2 in case of Error while parsing.
-    ///            -3 in case of invalid DCERPC header.
+    /// * Failure:
+    //    -1 in case of Incomplete data or Eof.
+    ///   -2 in case of Error while parsing.
+    ///   -3 in case of invalid DCERPC header.
     pub fn process_header(&mut self, input: &[u8]) -> i32 {
         match parser::parse_dcerpc_header(input) {
             Ok((leftover_bytes, header)) => {
@@ -782,15 +775,9 @@ impl DCERPCState {
     /// Handles stub data for both request and response.
     ///
     /// Arguments:
-    /// * `input`:
-    ///           type: u8 vector slice.
-    ///    description: bytes left *after* parsing header.
-    /// * `bytes_consumed`:
-    ///           type: 16 bit unsigned integer.
-    ///    description: bytes consumed *after* parsing header.
-    /// * `dir`:
-    ///           type: enum Direction.
-    ///    description: direction whose stub is supposed to be handled.
+    /// * `input`: bytes left *after* parsing header.
+    /// * `bytes_consumed`: bytes consumed *after* parsing header.
+    /// * `dir`: direction whose stub is supposed to be handled.
     ///
     /// Return value:
     /// * Success: Number of bytes successfully parsed.
index 98c1db883acfe8510daac6dd7dfcd8b67d57de0c..ed6cc688f3d5da475c91dd1bc35821367b68528a 100644 (file)
@@ -130,8 +130,7 @@ impl DCERPCUDPState {
     /// parser in C. This requires an internal transaction ID to be maintained.
     ///
     /// Arguments:
-    /// * `tx_id`:
-    ///    description: internal transaction ID to track transactions
+    /// * `tx_id`: internal transaction ID to track transactions
     ///
     /// Return value:
     /// Option mutable reference to DCERPCTransaction
index 5800c64be59463ca4f628536b2af0b246348bd46..4db997df6b425af4db908138e5194921d8435796 100644 (file)
@@ -465,8 +465,8 @@ pub unsafe extern "C" fn SCDetectRequiresStatusLog(
 ///   *  0 - OK, rule should continue loading
 ///   * -1 - Error parsing the requires content
 ///   * -4 - Requirements not met, don't continue loading the rule, this
-///          value is chosen so it can be passed back to the options parser
-///          as its treated as a non-fatal silent error.
+///     value is chosen so it can be passed back to the options parser
+///     as its treated as a non-fatal silent error.
 #[no_mangle]
 pub unsafe extern "C" fn SCDetectCheckRequires(
     requires: *const c_char, suricata_version_string: *const c_char, errstr: *mut *const c_char,
index d373ae936ed61fc0ffbdf2f6fe22ccafc151b831..bc30ad3a975de5dc2d801f416bb9afc79294f241 100644 (file)
@@ -215,9 +215,7 @@ pub struct RpcPacket<'a> {
 ///  2. we have partial data (large records) -> allow partial prog_data parsing
 ///
 /// Arguments:
-/// * `complete`:
-///           type: bool
-///    description: do full parsing, including of `prog_data`
+/// * `complete`: do full parsing, including of `prog_data`
 ///
 pub fn parse_rpc(start_i: &[u8], complete: bool) -> IResult<&[u8], RpcPacket> {
     let (i, hdr) = parse_rpc_packet_header(start_i)?;
@@ -282,9 +280,7 @@ pub fn parse_rpc(start_i: &[u8], complete: bool) -> IResult<&[u8], RpcPacket> {
 ///  2. we have partial data (large records) -> allow partial prog_data parsing
 ///
 /// Arguments:
-/// * `complete`:
-///           type: bool
-///    description: do full parsing, including of `prog_data`
+/// * `complete`: do full parsing, including of `prog_data`
 ///
 pub fn parse_rpc_reply(start_i: &[u8], complete: bool) -> IResult<&[u8], RpcReplyPacket> {
     let (i, hdr) = parse_rpc_packet_header(start_i)?;