Skip to content

Commit

Permalink
Remove unnecessary pub(crate) visibility specifier
Browse files Browse the repository at this point in the history
The slice_from_array function declared inside ProgramMut::test_run() is,
well, private to the function. Hence, it makes little sense to slab on a
visibility specifier. Remove it.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Aug 8, 2024
1 parent 3685047 commit c611594
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libbpf-rs/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,7 @@ impl<'obj> ProgramMut<'obj> {
/// [BPF_PROG_RUN](https://www.kernel.org/doc/html/latest/bpf/bpf_prog_run.html)
/// facility.
pub fn test_run<'dat>(&mut self, input: Input<'dat>) -> Result<Output<'dat>> {
pub(crate) unsafe fn slice_from_array<'t, T>(
items: *mut T,
num_items: usize,
) -> Option<&'t mut [T]> {
unsafe fn slice_from_array<'t, T>(items: *mut T, num_items: usize) -> Option<&'t mut [T]> {
if items.is_null() {
None
} else {
Expand Down

0 comments on commit c611594

Please sign in to comment.