Skip to content

Commit 97e9310

Browse files
committed
Fix new clippy lints up until Rust 1.85
1 parent e4a0b94 commit 97e9310

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ndk/src/event.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ pub struct Pointer<'a> {
656656

657657
// TODO: thread safety?
658658

659-
impl<'a> Pointer<'a> {
659+
impl Pointer<'_> {
660660
#[inline]
661661
pub fn pointer_index(&self) -> usize {
662662
self.index
@@ -766,7 +766,7 @@ impl<'a> Iterator for PointersIter<'a> {
766766
(size, Some(size))
767767
}
768768
}
769-
impl<'a> ExactSizeIterator for PointersIter<'a> {
769+
impl ExactSizeIterator for PointersIter<'_> {
770770
fn len(&self) -> usize {
771771
self.count - self.next_index
772772
}
@@ -877,7 +877,7 @@ pub struct HistoricalPointer<'a> {
877877

878878
// TODO: thread safety?
879879

880-
impl<'a> HistoricalPointer<'a> {
880+
impl HistoricalPointer<'_> {
881881
#[inline]
882882
pub fn pointer_index(&self) -> usize {
883883
self.pointer_index

ndk/src/looper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ impl ForeignLooper {
322322
/// The caller should guarantee that this file descriptor stays open until it is removed via
323323
/// [`remove_fd()`][Self::remove_fd()], and for however long the caller wishes to use this file
324324
/// descriptor when it is returned in [`Poll::Event::fd`].
325-
325+
//
326326
// `ALooper_addFd` won't dereference `data`; it will only pass it on to the event.
327327
// Optionally dereferencing it there already enforces `unsafe` context.
328328
#[allow(clippy::not_unsafe_ptr_arg_deref)]

ndk/src/native_window.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub struct NativeWindowBufferLockGuard<'a> {
300300
buffer: ffi::ANativeWindow_Buffer,
301301
}
302302

303-
impl<'a> NativeWindowBufferLockGuard<'a> {
303+
impl NativeWindowBufferLockGuard<'_> {
304304
/// The number of pixels that are shown horizontally.
305305
pub fn width(&self) -> usize {
306306
usize::try_from(self.buffer.width).unwrap()
@@ -371,7 +371,7 @@ impl<'a> NativeWindowBufferLockGuard<'a> {
371371
}
372372
}
373373

374-
impl<'a> Drop for NativeWindowBufferLockGuard<'a> {
374+
impl Drop for NativeWindowBufferLockGuard<'_> {
375375
fn drop(&mut self) {
376376
let ret = unsafe { ffi::ANativeWindow_unlockAndPost(self.window.ptr.as_ptr()) };
377377
assert_eq!(ret, 0);

0 commit comments

Comments
 (0)