소스 검색

Make doc fixes

Signed-off-by: Andre Fredette <afredette@redhat.com>
Andre Fredette 2 년 전
부모
커밋
abb75ba029
1개의 변경된 파일3개의 추가작업 그리고 9개의 파일을 삭제
  1. 3 9
      aya/src/programs/tc.rs

+ 3 - 9
aya/src/programs/tc.rs

@@ -55,7 +55,6 @@ pub enum TcAttachType {
 /// #     Bpf(#[from] aya::BpfError)
 /// # }
 /// # let mut bpf = aya::Bpf::load(&[])?;
-/// use aya::programs::tc::TcOptions;
 /// use aya::programs::{tc, SchedClassifier, TcAttachType};
 ///
 /// // the clsact qdisc needs to be added before SchedClassifier programs can be
@@ -64,13 +63,8 @@ pub enum TcAttachType {
 ///
 /// let prog: &mut SchedClassifier = bpf.program_mut("redirect_ingress").unwrap().try_into()?;
 /// prog.load()?;
-///
-///  // the following demonstrates using the standard attach with default options
 /// prog.attach("eth0", TcAttachType::Ingress)?;
 ///
-/// // the following demonstrates the `attach_with_options` variant
-/// prog.attach_with_options("eth0", TcAttachType::Ingress, TcOptions {priority: 50, handle: 3})?;
-///
 /// # Ok::<(), Error>(())
 /// ```
 #[derive(Debug)]
@@ -108,10 +102,10 @@ impl TcAttachType {
 /// Options for SchedClassifier attach
 #[derive(Default)]
 pub struct TcOptions {
-    /// `priority`: priority assigned to tc program with lower number = higher priority.
-    ///  If set to default (0), the system chooses the next highest priority or 49152 if no filters exist yet
+    /// Priority assigned to tc program with lower number = higher priority.
+    /// If set to default (0), the system chooses the next highest priority or 49152 if no filters exist yet
     pub priority: u16,
-    /// `handle`: used to uniquely identify a program at a given priority level.  
+    /// Handle used to uniquely identify a program at a given priority level.
     /// If set to default (0), the system chooses a handle.
     pub handle: u32,
 }