Skip to content

Commit c611594

Browse files
d-e-s-odanielocfb
authored andcommitted
Remove unnecessary pub(crate) visibility specifier
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]>
1 parent 3685047 commit c611594

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libbpf-rs/src/program.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1056,10 +1056,7 @@ impl<'obj> ProgramMut<'obj> {
10561056
/// [BPF_PROG_RUN](https://www.kernel.org/doc/html/latest/bpf/bpf_prog_run.html)
10571057
/// facility.
10581058
pub fn test_run<'dat>(&mut self, input: Input<'dat>) -> Result<Output<'dat>> {
1059-
pub(crate) unsafe fn slice_from_array<'t, T>(
1060-
items: *mut T,
1061-
num_items: usize,
1062-
) -> Option<&'t mut [T]> {
1059+
unsafe fn slice_from_array<'t, T>(items: *mut T, num_items: usize) -> Option<&'t mut [T]> {
10631060
if items.is_null() {
10641061
None
10651062
} else {

0 commit comments

Comments
 (0)