forge
Explore
Log in

Don't you dare go Hollow

animation: Use saturating_sub in value()

Browse files at this commit

dfe3580607ff469837c23b34db34882b16d87a47Ivan MolodetskikhParent: 1c02552
src/animation/mod.rsmodified+1 -1
@@ -292,7 +292,7 @@ impl Animation {
292292 return self.to;
293293 }
294294
295- let passed = self.current_time - self.start_time;
295+ let passed = self.current_time.saturating_sub(self.start_time);
296296
297297 match self.kind {
298298 Kind::Easing { curve } => {