Skip to content

Commit 280b19b

Browse files
danobiinsearchoflosttime
authored andcommitted
TcHookBuilder: Fix doc links and formatting
1 parent 3de4276 commit 280b19b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libbpf-rs/src/tc.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ impl TcHook {
211211

212212
/// Builds [`TcHook`] instances.
213213
///
214-
/// TcHookBuilder is a way to ergonomically create multiple TcHooks,
214+
/// [`TcHookBuilder`] is a way to ergonomically create multiple `TcHook`s,
215215
/// all with similar initial values.
216216
///
217-
/// Once a TcHook is created via the hook() method, the TcHook's values can still
218-
/// be adjusted before attach() is called.
217+
/// Once a `TcHook` is created via the [`Self::hook()`] method, the `TcHook`'s values can still
218+
/// be adjusted before [`TcHook::attach()`] is called.
219219
#[derive(Debug, Default)]
220220
pub struct TcHookBuilder {
221221
fd: i32,
@@ -233,7 +233,7 @@ impl TcHookBuilder {
233233
}
234234

235235
/// Set the initial file descriptor for created hooks
236-
/// this fd should come from a loaded libbpf_rs::Program
236+
/// this fd should come from a loaded [`Program`]
237237
pub fn fd(&mut self, fd: i32) -> &mut Self {
238238
self.fd = fd;
239239
self
@@ -270,10 +270,10 @@ impl TcHookBuilder {
270270
self
271271
}
272272

273-
/// Create a Hook given the values previously set
273+
/// Create a [`TcHook`] given the values previously set
274274
///
275-
/// Once a hook is created, the values can still be changed on the TcHook
276-
/// by calling the TcHooks setter methods
275+
/// Once a hook is created, the values can still be changed on the `TcHook`
276+
/// by calling the `TcHooks` setter methods
277277
pub fn hook(&self, attach_point: TcAttachPoint) -> TcHook {
278278
let mut hook = TcHook::new(self.fd);
279279
hook.ifindex(self.ifindex)

0 commit comments

Comments
 (0)