From 2826d670d65b078f76eda24f7251095fcbe4baa6 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 9 Apr 2025 10:53:50 -0600 Subject: [PATCH] rust: fix rustdoc indentation in lists Ticket: #7652 --- rust/src/dcerpc/dcerpc.rs | 33 ++++++++++----------------------- rust/src/dcerpc/dcerpc_udp.rs | 3 +-- rust/src/detect/requires.rs | 4 ++-- rust/src/nfs/rpc_records.rs | 8 ++------ 4 files changed, 15 insertions(+), 33 deletions(-) diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index b99b23d3f5..5469b736b0 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -485,9 +485,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 @@ -505,12 +503,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`: description: direction of the flow /// /// Return value: /// Option mutable reference to DCERPCTransaction @@ -612,14 +606,13 @@ 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. + /// * Failure: + /// * -1 in case of Incomplete data or Eof. + /// * -2 in case of Error while parsing. pub fn process_header(&mut self, input: &[u8]) -> i32 { match parser::parse_dcerpc_header(input) { Ok((leftover_bytes, header)) => { @@ -826,15 +819,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. diff --git a/rust/src/dcerpc/dcerpc_udp.rs b/rust/src/dcerpc/dcerpc_udp.rs index 700e38fe36..785aa2ce3e 100644 --- a/rust/src/dcerpc/dcerpc_udp.rs +++ b/rust/src/dcerpc/dcerpc_udp.rs @@ -127,8 +127,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 diff --git a/rust/src/detect/requires.rs b/rust/src/detect/requires.rs index bce9031ac0..fe4c46b3d0 100644 --- a/rust/src/detect/requires.rs +++ b/rust/src/detect/requires.rs @@ -448,8 +448,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, diff --git a/rust/src/nfs/rpc_records.rs b/rust/src/nfs/rpc_records.rs index d373ae936e..bc30ad3a97 100644 --- a/rust/src/nfs/rpc_records.rs +++ b/rust/src/nfs/rpc_records.rs @@ -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)?; -- 2.47.2