Skip to content

Commit e11dfc7

Browse files
committed
Eliminate a couple of Clippy warnings
Newer versions of Clippy report a couple of warnings. Address them. Signed-off-by: Daniel Müller <[email protected]>
1 parent b75b2e2 commit e11dfc7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

libbpf-rs/src/btf/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl Display for Linkage {
323323

324324
// Void
325325
gen_fieldless_concrete_type! {
326-
/// The representation of the c_void type.
326+
/// The representation of the [`c_void`][std::ffi::c_void] type.
327327
Void
328328
}
329329

@@ -728,7 +728,7 @@ gen_collection_concrete_type! {
728728
/// See also [libbpf docs](https://www.kernel.org/doc/html/latest/bpf/btf.html#btf-kind-func-proto)
729729
btf_param as FuncProto with ReferencesType;
730730

731-
/// A parameter of a [FuncProto].
731+
/// A parameter of a [`FuncProto`].
732732
struct FuncProtoParam<'btf> {
733733
/// The parameter's name
734734
pub name: Option<&'btf OsStr>,

libbpf-rs/tests/test.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ fn test_object_map_create_without_name() {
14971497
assert_eq!(val, res);
14981498
}
14991499

1500-
/// Test whether we can obtain multiple `MapHandle`s from a `Map
1500+
/// Test whether we can obtain multiple `MapHandle`s from a `Map`.
15011501
#[tag(root)]
15021502
#[test]
15031503
fn test_object_map_handle_clone() {
@@ -1667,7 +1667,7 @@ fn test_object_kprobe_with_opts() {
16671667
}
16681668

16691669
/// Check that we can attach a BPF program to multiple kernel kprobes using
1670-
/// kprobe_multi.
1670+
/// `kprobe_multi`.
16711671
#[tag(root)]
16721672
#[test]
16731673
#[ignore = "requires kernel with kprobe multi support"]
@@ -1687,7 +1687,7 @@ fn test_object_kprobe_multi() {
16871687
}
16881688

16891689
/// Check that we can attach a BPF program to multiple kernel kprobes using
1690-
/// kprobe_multi, providing additional options.
1690+
/// `kprobe_multi`, providing additional options.
16911691
#[tag(root)]
16921692
#[test]
16931693
#[ignore = "requires kernel with kprobe multi support"]
@@ -2004,7 +2004,7 @@ fn test_map_pinned_status() {
20042004
let _unused = fs::remove_file(expected_path);
20052005
}
20062006

2007-
/// Change the root_pin_path and see if it works.
2007+
/// Change the `root_pin_path` and see if it works.
20082008
#[tag(root)]
20092009
#[test]
20102010
fn test_map_pinned_status_with_pin_root_path() {
@@ -2168,7 +2168,8 @@ fn test_run_prog_fail() {
21682168
let _err = prog.test_run(input).unwrap_err();
21692169
}
21702170

2171-
/// Check that we can run a program with test_run with `repeat` set.
2171+
/// Check that we can run a program with `test_run` with `repeat` set.
2172+
///
21722173
/// We set a counter in the program which we bump each time we run the
21732174
/// program.
21742175
/// We check that the counter is equal to the value of `repeat`.

0 commit comments

Comments
 (0)