Skip to content

Commit 8f89434

Browse files
committed
Fix warnings generated on Fuchsia
1 parent c3c297a commit 8f89434

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/print/fuchsia.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ extern "C" {
1212
// callback on each call. 'size' gives the size of the dl_phdr_info.
1313
#[allow(improper_ctypes)]
1414
fn dl_iterate_phdr(
15-
f: extern "C" fn(info: &dl_phdr_info, size: usize, data: &mut DsoPrinter) -> i32,
16-
data: &mut DsoPrinter,
15+
f: extern "C" fn(info: &dl_phdr_info, size: usize, data: &mut DsoPrinter<'_, '_>) -> i32,
16+
data: &mut DsoPrinter<'_, '_>,
1717
) -> i32;
1818
}
1919

@@ -224,7 +224,7 @@ const PERM_W: u32 = 0b00000010;
224224
const PERM_R: u32 = 0b00000100;
225225

226226
impl core::fmt::Display for Perm {
227-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
227+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
228228
let v = self.0;
229229
if v & PERM_R != 0 {
230230
f.write_char('r')?
@@ -310,7 +310,7 @@ struct HexSlice<'a> {
310310
}
311311

312312
impl fmt::Display for HexSlice<'_> {
313-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
313+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
314314
for byte in self.bytes {
315315
write!(f, "{:02x}", byte)?;
316316
}
@@ -349,8 +349,12 @@ enum Error {
349349
/// # Arguments
350350
///
351351
/// * `visitor` - A DsoPrinter that will have one of eats methods called foreach DSO.
352-
fn for_each_dso(mut visitor: &mut DsoPrinter) {
353-
extern "C" fn callback(info: &dl_phdr_info, _size: usize, visitor: &mut DsoPrinter) -> i32 {
352+
fn for_each_dso(mut visitor: &mut DsoPrinter<'_, '_>) {
353+
extern "C" fn callback(
354+
info: &dl_phdr_info,
355+
_size: usize,
356+
visitor: &mut DsoPrinter<'_, '_>,
357+
) -> i32 {
354358
// dl_iterate_phdr ensures that info.name will point to a valid
355359
// location.
356360
let name_len = unsafe { libc::strlen(info.name) };

0 commit comments

Comments
 (0)