Skip to content

Commit 0656763

Browse files
d-e-s-odanielocfb
authored andcommitted
Remove deprecated Link::get_fd() method
This change removes the Link::get_fd() method, which has been deprecated for several releases by now. Signed-off-by: Daniel Müller <[email protected]>
1 parent d76c014 commit 0656763

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

libbpf-cargo/src/gen/btf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<'s> GenBtf<'s> {
8484
let mut anon_table = self.anon_types.borrow_mut();
8585
let len = anon_table.len() + 1; // use 1 index anon ids for backwards compat
8686
let anon_id = anon_table.entry(t.type_id()).or_insert(len);
87-
format!("{}{}", ANON_PREFIX, anon_id).into()
87+
format!("{ANON_PREFIX}{anon_id}").into()
8888
}
8989
Some(n) => n.to_string_lossy(),
9090
}

libbpf-rs/src/btf/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl<'btf> Btf<'btf> {
198198
})
199199
}
200200

201-
/// From raw bytes comming from an object file.
201+
/// From raw bytes coming from an object file.
202202
pub fn from_raw(name: &'btf str, object_file: &'btf [u8]) -> Result<Option<Self>> {
203203
let cname = CString::new(name)
204204
.map_err(|_| Error::InvalidInput(format!("invalid path {name:?}, has null bytes")))

libbpf-rs/src/link.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ impl Link {
8181
util::parse_ret(ret)
8282
}
8383

84-
/// Returns the file descriptor of the link.
85-
#[deprecated(since = "0.17.0", note = "please use `fd` instead")]
86-
pub fn get_fd(&self) -> i32 {
87-
unsafe { libbpf_sys::bpf_link__fd(self.ptr.as_ptr()) }
88-
}
89-
9084
/// Returns the file descriptor of the link.
9185
pub fn fd(&self) -> i32 {
9286
unsafe { libbpf_sys::bpf_link__fd(self.ptr.as_ptr()) }

0 commit comments

Comments
 (0)