]> git.lizzy.rs Git - rust.git/commit
Panic on overflow in `Duration::new` constructor
authorTobias Bucher <tobiasbucher5991@gmail.com>
Mon, 18 Apr 2016 10:31:16 +0000 (12:31 +0200)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Mon, 18 Apr 2016 10:41:30 +0000 (12:41 +0200)
commitb25bb53043a92dc343ebdf9f4e71fefffe4fee2a
tree7064a85f86b912eb5b6749f7f55d72a515a08a42
parent63760acf31e605c8a91bb5cbcbcb4bfb95435e48
Panic on overflow in `Duration::new` constructor

Panicking on overflow is also done for `+`, and it replaces the
currently incorrect overflow behavior of wrapping around, which does not
make sense for `Duration`s.
src/libstd/time/duration.rs