Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Oct 9, 2020
1 parent f0a26c6 commit e7a1a24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ impl std::error::Error for GetTimezoneError {}

impl std::fmt::Display for GetTimezoneError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {

use GetTimezoneError::*;
let descr = match self {
&FailedParsingString => "GetTimezoneError::FailedParsingString",
Expand All @@ -57,7 +56,7 @@ impl std::convert::From<std::io::Error> for GetTimezoneError {
}

/// Get the IANA time zone as a string.
pub fn get_timezone() -> std::result::Result<String,crate::GetTimezoneError> {
pub fn get_timezone() -> std::result::Result<String, crate::GetTimezoneError> {
platform::get_timezone_inner()
}

Expand Down
2 changes: 1 addition & 1 deletion src/linux.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub(crate) fn get_timezone_inner() -> Result<String,crate::GetTimezoneError> {
pub(crate) fn get_timezone_inner() -> Result<String, crate::GetTimezoneError> {
// see https://stackoverflow.com/a/12523283
use std::io::Read;

Expand Down
2 changes: 1 addition & 1 deletion src/macos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub(crate) fn get_timezone_inner() -> Result<String,crate::GetTimezoneError> {
pub(crate) fn get_timezone_inner() -> Result<String, crate::GetTimezoneError> {
let tz = core_foundation::timezone::CFTimeZone::system();

// Get string like ""Europe/Berlin (GMT+2) offset 7200 (Daylight)""
Expand Down
2 changes: 1 addition & 1 deletion src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl std::convert::From<winrt::Error> for crate::GetTimezoneError {
}
}

pub(crate) fn get_timezone_inner() -> std::result::Result<String,crate::GetTimezoneError> {
pub(crate) fn get_timezone_inner() -> std::result::Result<String, crate::GetTimezoneError> {
use windows::globalization::Calendar;

let cal = Calendar::new()?;
Expand Down

0 comments on commit e7a1a24

Please sign in to comment.