about summary refs log tree commit diff
path: root/src/libstd/time
diff options
context:
space:
mode:
authorSubhash Bhushan <subhash.bhushan@kaybus.com>2014-11-08 21:17:51 +0530
committerSubhash Bhushan <subhash.bhushan@kaybus.com>2014-11-20 23:45:42 +0530
commitbc9de771d5f2ab71a0e3b0eb27a92c65e8ddd4b9 (patch)
tree3c4b73ceb5ca5574d2025d9da1ed86a2f6af2b71 /src/libstd/time
parent394269d16e3752a23ffa273e68f8aaefd2a510c4 (diff)
downloadrust-bc9de771d5f2ab71a0e3b0eb27a92c65e8ddd4b9.tar.gz
rust-bc9de771d5f2ab71a0e3b0eb27a92c65e8ddd4b9.zip
Rename remaining Failures to Panic
Diffstat (limited to 'src/libstd/time')
-rw-r--r--src/libstd/time/duration.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 39ca3128ccb..ec2d62ff85c 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -65,7 +65,7 @@ pub const MAX: Duration = Duration {
 impl Duration {
     /// Makes a new `Duration` with given number of weeks.
     /// Equivalent to `Duration::seconds(weeks * 7 * 24 * 60 * 60), with overflow checks.
-    /// Fails when the duration is out of bounds.
+    /// Panics when the duration is out of bounds.
     #[inline]
     pub fn weeks(weeks: i64) -> Duration {
         let secs = weeks.checked_mul(SECS_PER_WEEK).expect("Duration::weeks out of bounds");
@@ -74,7 +74,7 @@ impl Duration {
 
     /// Makes a new `Duration` with given number of days.
     /// Equivalent to `Duration::seconds(days * 24 * 60 * 60)` with overflow checks.
-    /// Fails when the duration is out of bounds.
+    /// Panics when the duration is out of bounds.
     #[inline]
     pub fn days(days: i64) -> Duration {
         let secs = days.checked_mul(SECS_PER_DAY).expect("Duration::days out of bounds");
@@ -83,7 +83,7 @@ impl Duration {
 
     /// Makes a new `Duration` with given number of hours.
     /// Equivalent to `Duration::seconds(hours * 60 * 60)` with overflow checks.
-    /// Fails when the duration is out of bounds.
+    /// Panics when the duration is out of bounds.
     #[inline]
     pub fn hours(hours: i64) -> Duration {
         let secs = hours.checked_mul(SECS_PER_HOUR).expect("Duration::hours ouf of bounds");
@@ -92,7 +92,7 @@ impl Duration {
 
     /// Makes a new `Duration` with given number of minutes.
     /// Equivalent to `Duration::seconds(minutes * 60)` with overflow checks.
-    /// Fails when the duration is out of bounds.
+    /// Panics when the duration is out of bounds.
     #[inline]
     pub fn minutes(minutes: i64) -> Duration {
         let secs = minutes.checked_mul(SECS_PER_MINUTE).expect("Duration::minutes out of bounds");
@@ -100,7 +100,7 @@ impl Duration {
     }
 
     /// Makes a new `Duration` with given number of seconds.
-    /// Fails when the duration is more than `i64::MAX` milliseconds
+    /// Panics when the duration is more than `i64::MAX` milliseconds
     /// or less than `i64::MIN` milliseconds.
     #[inline]
     pub fn seconds(seconds: i64) -> Duration {