Merge pull request #313 from kennytm/inline-fixed-offset-getters

Mark `FixedOffset::{local_minus_utc, utc_minus_local}` as `#[inline]`.
This commit is contained in:
Brandon W Maister 2019-04-22 10:46:06 -04:00 committed by GitHub
commit 1407309b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -86,11 +86,13 @@ impl FixedOffset {
}
/// Returns the number of seconds to add to convert from UTC to the local time.
#[inline]
pub fn local_minus_utc(&self) -> i32 {
self.local_minus_utc
}
/// Returns the number of seconds to add to convert from the local time to UTC.
#[inline]
pub fn utc_minus_local(&self) -> i32 {
-self.local_minus_utc
}