From eb6e97c18e1ec7eca9afe8f950bd54edde7c4255 Mon Sep 17 00:00:00 2001 From: aecsocket <43144841+aecsocket@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:44:52 +0100 Subject: [PATCH] Make ActiveAnimation::set_weight return &mut Self (#14914) # Objective Fixes #14907. ## Solution Changes `ActiveAnimation::set_weight` to return `&mut Self`. ## Testing Simple API change, I don't think this needs explicit testing. --- crates/bevy_animation/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index e8e394b957..70c49b3c39 100755 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -442,8 +442,9 @@ impl ActiveAnimation { } /// Sets the weight of this animation. - pub fn set_weight(&mut self, weight: f32) { + pub fn set_weight(&mut self, weight: f32) -> &mut Self { self.weight = weight; + self } /// Pause the animation.