From: Jason Ish Date: Fri, 12 May 2023 14:59:54 +0000 (-0600) Subject: rust/doc: restore comment with code example, but ignore X-Git-Tag: suricata-7.0.0-rc2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8879%2Fhead;p=thirdparty%2Fsuricata.git rust/doc: restore comment with code example, but ignore Use backticks for proper markdown processing. As Rust code in backticks is compiled, and this is a non-complete example, tag the code sample to be ignored. --- diff --git a/rust/src/applayer.rs b/rust/src/applayer.rs index 3f33c5f9d8..75e507de59 100644 --- a/rust/src/applayer.rs +++ b/rust/src/applayer.rs @@ -588,20 +588,21 @@ pub trait AppLayerEvent { ) -> i8; } -// -// Normally usage of this function will be generated by -// derive(AppLayerEvent), for example: -// -// #[derive(AppLayerEvent)] -// enum AppEvent { -// EventOne, -// EventTwo, -// } -// -// get_event_info::(...) - /// Generic `get_info_info` implementation for enums implementing /// AppLayerEvent. +/// +/// Normally usage of this function will be generated by +/// derive(AppLayerEvent), for example: +/// +/// ```rust,ignore +/// #[derive(AppLayerEvent)] +/// enum AppEvent { +/// EventOne, +/// EventTwo, +/// } +/// +/// get_event_info::(...) +/// ``` #[inline(always)] pub unsafe fn get_event_info( event_name: *const std::os::raw::c_char,