animation: Use saturating_sub in value()
Browse files at this commitdfe3580607ff469837c23b34db34882b16d87a47Parent: 1c025521 changed file +1 -1
- src/animation/mod.rs +1 -1
src/animation/mod.rsmodified+1 -1
| @@ -292,7 +292,7 @@ impl Animation { | |||
| 292 | return self.to; | 292 | return self.to; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | - let passed = self.current_time - self.start_time; | 295 | + let passed = self.current_time.saturating_sub(self.start_time); |
| 296 | 296 | ||
| 297 | match self.kind { | 297 | match self.kind { |
| 298 | Kind::Easing { curve } => { | 298 | Kind::Easing { curve } => { |