Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Commit 2fe6628

Browse files
committed
Make current nightly rustc and Clippy happy.
1 parent efca590 commit 2fe6628

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/archetype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ fn alloc_ptr(layout: Layout) -> *mut u8 {
387387

388388
fn invalid_ptr(addr: usize) -> *mut u8 {
389389
unsafe {
390-
#[allow(clippy::useless_transmute)]
390+
#[allow(integer_to_ptr_transmutes, clippy::useless_transmute)]
391391
transmute(addr)
392392
}
393393
}

src/query.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ where
163163
QueryRef {
164164
world,
165165
_ref,
166+
#[allow(clippy::missing_transmute_annotations)]
166167
comps: unsafe { transmute(&*self.comps) },
168+
#[allow(clippy::missing_transmute_annotations)]
167169
ptrs: unsafe { transmute(&mut *self.ptrs) },
168170
}
169171
}
@@ -482,15 +484,15 @@ where
482484
/// assert_eq!(*i2, 23);
483485
/// assert_eq!(f2.copied(), None);
484486
/// ```
485-
pub fn get(&self, ent: Entity) -> Option<<S::Fetch as Fetch>::Item>
487+
pub fn get(&self, ent: Entity) -> Option<<S::Fetch as Fetch<'_>>::Item>
486488
where
487489
S::Fetch: FetchShared,
488490
{
489491
unsafe { self.get_unchecked(ent) }
490492
}
491493

492494
/// Exclusively access the queried components of the given [Entity]
493-
pub fn get_mut(&mut self, ent: Entity) -> Option<<S::Fetch as Fetch>::Item> {
495+
pub fn get_mut(&mut self, ent: Entity) -> Option<<S::Fetch as Fetch<'_>>::Item> {
494496
unsafe { self.get_unchecked(ent) }
495497
}
496498

@@ -520,7 +522,7 @@ where
520522
pub fn get_many_mut<const N: usize>(
521523
&mut self,
522524
ent: [Entity; N],
523-
) -> [Option<<S::Fetch as Fetch>::Item>; N] {
525+
) -> [Option<<S::Fetch as Fetch<'_>>::Item>; N] {
524526
let mut val = MaybeUninit::uninit();
525527

526528
let ptr = val.as_mut_ptr() as *mut Option<<S::Fetch as Fetch>::Item>;

src/world.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ impl World {
502502
/// let comp = world.query_one::<&u32>(entity).unwrap();
503503
/// assert_eq!(*comp.get(), 42);
504504
/// ```
505-
pub fn query_one<S>(&self, ent: Entity) -> Option<QueryOne<S>>
505+
pub fn query_one<S>(&self, ent: Entity) -> Option<QueryOne<'_, S>>
506506
where
507507
S: QuerySpec,
508508
{

0 commit comments

Comments
 (0)