Skip to content

Commit

Permalink
Made clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Zinn <[email protected]>
  • Loading branch information
BenediktZinn committed Jan 14, 2025
1 parent 02c528f commit 79c46c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions rust/backend/daemon/src/collector/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct AggregatorArguments {
}

impl AggregatorArguments {
pub fn new(
pub fn _new(
event_actor: ActorRef<Event>,
timeframe: Duration,
event_type_enum: EventTypeEnum,
Expand Down Expand Up @@ -103,7 +103,7 @@ impl Actor for Aggregator {
) -> Result<(), ActorProcessingErr> {
match msg.event_type {
Some(EventType::Log(event)) => {
let msg_event_type = EventTypeEnum::try_from(event).unwrap();
let msg_event_type = EventTypeEnum::from(event);

if msg_event_type != state.event_type {
panic!(
Expand Down
8 changes: 3 additions & 5 deletions rust/backend/ebpf-test/tests/prog_test_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ fn prog_test_run_example() {

let mut attr = unsafe { mem::zeroed::<bpf_attr>() };

unsafe {
attr.test.prog_fd = fd as u32;
attr.test.ctx_in = args.as_ptr() as u64;
attr.test.ctx_size_in = args.len() as u32 * 8;
}
attr.test.prog_fd = fd as u32;
attr.test.ctx_in = args.as_ptr() as u64;
attr.test.ctx_size_in = args.len() as u32 * 8;

let _ = {
let ret = unsafe { syscall(SYS_bpf, bpf_cmd::BPF_PROG_TEST_RUN, &mut attr, size_of::<bpf_attr>()) };
Expand Down
2 changes: 1 addition & 1 deletion rust/shared/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static UNIFFI_RECORDS: LazyLock<Vec<&str>> = LazyLock::new(|| {

static UNIFFI_ENUMS: LazyLock<Vec<&str>> = LazyLock::new(|| {
if cfg!(feature = "uniffi") {
vec!["Process.cmd", "Event.event_data", "JniReferencesEvent.JniMethodName"]
vec!["Process.cmd", "Event.event_data", "JniReferencesEvent.JniMethodName", "Event.event_type"]
} else {
vec![]
}
Expand Down

0 comments on commit 79c46c7

Please sign in to comment.