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:
commit
1407309b87
|
@ -86,11 +86,13 @@ impl FixedOffset {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the number of seconds to add to convert from UTC to the local time.
|
/// Returns the number of seconds to add to convert from UTC to the local time.
|
||||||
|
#[inline]
|
||||||
pub fn local_minus_utc(&self) -> i32 {
|
pub fn local_minus_utc(&self) -> i32 {
|
||||||
self.local_minus_utc
|
self.local_minus_utc
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the number of seconds to add to convert from the local time to UTC.
|
/// Returns the number of seconds to add to convert from the local time to UTC.
|
||||||
|
#[inline]
|
||||||
pub fn utc_minus_local(&self) -> i32 {
|
pub fn utc_minus_local(&self) -> i32 {
|
||||||
-self.local_minus_utc
|
-self.local_minus_utc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue