Skip to content

Commit c0d678f

Browse files
committed
fix: missing lifetime specifier
1 parent 071f9df commit c0d678f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

agent/crates/enterprise-utils/src/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pub mod l7 {
3232
}
3333

3434
pub mod custom_field_policy {
35+
use std::marker::PhantomData;
36+
3537
pub mod enums {
3638
use std::sync::Arc;
3739

@@ -89,8 +91,11 @@ pub mod l7 {
8991
}
9092

9193
#[derive(Clone, Copy, Debug)]
92-
pub struct PolicySlice;
93-
impl PolicySlice {
94+
pub struct PolicySlice<'a> {
95+
_marker: PhantomData<&'a ()>,
96+
}
97+
98+
impl<'a> PolicySlice<'a> {
9499
pub fn apply(
95100
&self,
96101
_: &mut Store,
@@ -339,6 +344,7 @@ pub mod l7 {
339344

340345
pub mod mq {
341346
pub mod web_sphere_mq {
347+
use public::l7_protocol::LogMessageType;
342348

343349
#[derive(Default)]
344350
pub struct WebSphereMqParser {
@@ -349,7 +355,7 @@ pub mod l7 {
349355
}
350356

351357
impl WebSphereMqParser {
352-
pub fn check_payload(&mut self, _: &[u8], _: bool) -> bool {
358+
pub fn check_payload(&mut self, _: &[u8], _: bool) -> Option<LogMessageType> {
353359
unimplemented!()
354360
}
355361

agent/src/flow_generator/protocol_logs/mq/webspheremq.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,7 @@ const RESPONSE_CODE_OK_SUFFIX: &str = "0000";
325325
impl L7ProtocolParserInterface for WebSphereMqLog {
326326
fn check_payload(&mut self, payload: &[u8], param: &ParseParam) -> Option<LogMessageType> {
327327
let has_wasm = param.wasm_vm.borrow().is_some();
328-
if self.parser.check_payload(payload, has_wasm) {
329-
Some(LogMessageType::Request)
330-
} else {
331-
None
332-
}
328+
self.parser.check_payload(payload, has_wasm)
333329
}
334330

335331
fn parse_payload(&mut self, payload: &[u8], param: &ParseParam) -> Result<L7ParseResult> {

agent/src/flow_generator/protocol_logs/rpc/dubbo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ pub struct DubboLog {
516516
#[cfg(feature = "enterprise")]
517517
struct CustomFieldContext<'a> {
518518
direction: PacketDirection,
519-
policies: Option<PolicySlice>,
519+
policies: Option<PolicySlice<'a>>,
520520
store: &'a mut Store,
521521
}
522522

0 commit comments

Comments
 (0)