Skip to content

Commit

Permalink
Fix trivial unused_qualification lint violations
Browse files Browse the repository at this point in the history
Rust 1.78 is again detecting more violators of this lint.
  • Loading branch information
MarijnS95 committed May 14, 2024
1 parent 49bbbba commit ce3d82f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
8 changes: 4 additions & 4 deletions ndk/src/bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ pub enum BitmapInfoFlagsAlpha {
pub struct BitmapInfoFlags(u32);

#[cfg(feature = "api-level-30")]
impl std::fmt::Debug for BitmapInfoFlags {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl fmt::Debug for BitmapInfoFlags {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"BitmapInfoFlags({:#x}, alpha: {:?}, is_hardware: {})",
Expand Down Expand Up @@ -365,8 +365,8 @@ pub struct BitmapInfo {
inner: ffi::AndroidBitmapInfo,
}

impl std::fmt::Debug for BitmapInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl fmt::Debug for BitmapInfo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut f = f.debug_struct("BitmapInfo");
f.field("width", &self.width())
.field("height", &self.height())
Expand Down
2 changes: 1 addition & 1 deletion ndk/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use std::convert::TryFrom;
use std::ffi::{CStr, OsStr};
use std::fmt::{self, Write};
use std::fmt::{self, Write as _};
use std::os::unix::prelude::OsStrExt;
use std::path::Path;
use std::ptr::NonNull;
Expand Down
2 changes: 1 addition & 1 deletion ndk/src/input_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl InputQueue {
looper.ptr().as_ptr(),
id,
None,
std::ptr::null_mut(),
ptr::null_mut(),
)
}
}
Expand Down
11 changes: 3 additions & 8 deletions ndk/src/media/image_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ use crate::media_error::{construct, construct_never_null, MediaError, Result};
use crate::native_window::NativeWindow;
use crate::utils::abort_on_panic;
use num_enum::{FromPrimitive, IntoPrimitive};
use std::{
ffi::c_void,
fmt::{self, Debug, Formatter},
mem::MaybeUninit,
ptr::NonNull,
};
use std::{ffi::c_void, fmt, mem::MaybeUninit, ptr::NonNull};

#[cfg(feature = "api-level-26")]
use std::os::fd::{FromRawFd, IntoRawFd, OwnedFd};
Expand Down Expand Up @@ -120,8 +115,8 @@ pub struct ImageReader {
buffer_removed_cb: Option<Box<BufferRemovedListener>>,
}

impl Debug for ImageReader {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
impl fmt::Debug for ImageReader {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("ImageReader")
.field("inner", &self.inner)
.field(
Expand Down

0 comments on commit ce3d82f

Please sign in to comment.