You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound `chrono::Duration: Sum<&chrono::Duration>` is not satisfied
--> src/main.rs:17:44
|
17 | let total: Duration = durations.iter().sum();
| ^^^ the trait `Sum<&chrono::Duration>` is not implemented for `chrono::Duration`
Here is a basic example:
Running
cargo check
results inThe Duration in the std has
Sum
implemented (https://doc.rust-lang.org/std/time/struct.Duration.html#impl-Sum%3CDuration%3E), it would be nice if chrono had it too. If this is a feature that should be added, I would be willing to take a look at implementing it.The text was updated successfully, but these errors were encountered: