Skip to content

Commit dbd856d

Browse files
1 parent b1b3bd5 commit dbd856d

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

crates/bevy_ecs/src/query/fetch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<'w, T: Component> WorldQueryGats<'w> for &mut T {
840840
type _State = WriteState<T>;
841841
}
842842

843-
impl<'w, 's, T: Component> Fetch<'w> for WriteFetch<'w, T> {
843+
impl<'w, T: Component> Fetch<'w> for WriteFetch<'w, T> {
844844
type Item = Mut<'w, T>;
845845
type State = WriteState<T>;
846846

crates/bevy_ecs/src/system/system_param.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,11 @@ unsafe impl ReadOnlySystemParamFetch for WorldState {}
510510
#[doc(hidden)]
511511
pub struct WorldState;
512512

513-
impl<'w, 's> SystemParam for &'w World {
513+
impl<'w> SystemParam for &'w World {
514514
type Fetch = WorldState;
515515
}
516516

517-
unsafe impl<'w, 's> SystemParamState for WorldState {
517+
unsafe impl SystemParamState for WorldState {
518518
fn init(_world: &mut World, system_meta: &mut SystemMeta) -> Self {
519519
let mut access = Access::default();
520520
access.read_all();
@@ -1365,7 +1365,7 @@ impl<'w, 's, P: SystemParam> StaticSystemParam<'w, 's, P> {
13651365
pub struct StaticSystemParamState<S, P>(S, PhantomData<fn() -> P>);
13661366

13671367
// Safe: This doesn't add any more reads, and the delegated fetch confirms it
1368-
unsafe impl<'w, 's, S: ReadOnlySystemParamFetch, P> ReadOnlySystemParamFetch
1368+
unsafe impl<S: ReadOnlySystemParamFetch, P> ReadOnlySystemParamFetch
13691369
for StaticSystemParamState<S, P>
13701370
{
13711371
}
@@ -1394,7 +1394,7 @@ where
13941394
}
13951395
}
13961396

1397-
unsafe impl<'w, 's, S: SystemParamState, P: SystemParam + 'static> SystemParamState
1397+
unsafe impl<S: SystemParamState, P: SystemParam + 'static> SystemParamState
13981398
for StaticSystemParamState<S, P>
13991399
{
14001400
fn init(world: &mut World, system_meta: &mut SystemMeta) -> Self {

crates/bevy_ecs/src/world/world_cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'w> Drop for WorldCell<'w> {
7474
fn drop(&mut self) {
7575
let mut access = self.access.borrow_mut();
7676
// give world ArchetypeComponentAccess back to reuse allocations
77-
let _ = std::mem::swap(&mut self.world.archetype_component_access, &mut *access);
77+
std::mem::swap(&mut self.world.archetype_component_access, &mut *access);
7878
}
7979
}
8080

crates/bevy_reflect/src/array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl<'a> Iterator for ArrayIter<'a> {
210210

211211
impl<'a> ExactSizeIterator for ArrayIter<'a> {}
212212

213-
impl<'a> serde::Serialize for dyn Array {
213+
impl serde::Serialize for dyn Array {
214214
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
215215
where
216216
S: serde::Serializer,

crates/bevy_render/src/view/visibility/render_layers.rs

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ impl RenderLayers {
7676
///
7777
/// # Panics
7878
/// Panics when called with a layer greater than `TOTAL_LAYERS - 1`.
79+
#[must_use]
7980
pub const fn with(mut self, layer: Layer) -> Self {
8081
assert!((layer as usize) < Self::TOTAL_LAYERS);
8182
self.0 |= 1 << layer;
@@ -86,6 +87,7 @@ impl RenderLayers {
8687
///
8788
/// # Panics
8889
/// Panics when called with a layer greater than `TOTAL_LAYERS - 1`.
90+
#[must_use]
8991
pub const fn without(mut self, layer: Layer) -> Self {
9092
assert!((layer as usize) < Self::TOTAL_LAYERS);
9193
self.0 &= !(1 << layer);

crates/bevy_transform/src/components/global_transform.rs

+3
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,23 @@ impl GlobalTransform {
102102

103103
#[doc(hidden)]
104104
#[inline]
105+
#[must_use]
105106
pub const fn with_translation(mut self, translation: Vec3) -> Self {
106107
self.translation = translation;
107108
self
108109
}
109110

110111
#[doc(hidden)]
111112
#[inline]
113+
#[must_use]
112114
pub const fn with_rotation(mut self, rotation: Quat) -> Self {
113115
self.rotation = rotation;
114116
self
115117
}
116118

117119
#[doc(hidden)]
118120
#[inline]
121+
#[must_use]
119122
pub const fn with_scale(mut self, scale: Vec3) -> Self {
120123
self.scale = scale;
121124
self

crates/bevy_transform/src/components/transform.rs

+3
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,23 @@ impl Transform {
112112

113113
/// Returns this [`Transform`] with a new translation.
114114
#[inline]
115+
#[must_use]
115116
pub const fn with_translation(mut self, translation: Vec3) -> Self {
116117
self.translation = translation;
117118
self
118119
}
119120

120121
/// Returns this [`Transform`] with a new rotation.
121122
#[inline]
123+
#[must_use]
122124
pub const fn with_rotation(mut self, rotation: Quat) -> Self {
123125
self.rotation = rotation;
124126
self
125127
}
126128

127129
/// Returns this [`Transform`] with a new scale.
128130
#[inline]
131+
#[must_use]
129132
pub const fn with_scale(mut self, scale: Vec3) -> Self {
130133
self.scale = scale;
131134
self

0 commit comments

Comments
 (0)