Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1380e8d

Browse filesBrowse files
committed
formatting
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
1 parent 77fb165 commit 1380e8d
Copy full SHA for 1380e8d

File tree

Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed

‎vm/src/stdlib/time.rs

Copy file name to clipboardExpand all lines: vm/src/stdlib/time.rs
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ mod decl {
160160
fn get_tz_info() -> Time::TIME_ZONE_INFORMATION {
161161
let mut info = Time::TIME_ZONE_INFORMATION::default();
162162
let info_ptr = &mut info as *mut Time::TIME_ZONE_INFORMATION;
163-
let _ = unsafe {
164-
Time::GetTimeZoneInformation(info_ptr)
165-
};
163+
let _ = unsafe { Time::GetTimeZoneInformation(info_ptr) };
166164
info
167165
}
168166

@@ -187,7 +185,6 @@ mod decl {
187185
(info.Bias + info.StandardBias) * 60
188186
}
189187

190-
191188
#[cfg(not(target_os = "freebsd"))]
192189
#[cfg(not(target_env = "msvc"))]
193190
#[cfg(not(target_arch = "wasm32"))]
@@ -223,8 +220,12 @@ mod decl {
223220
fn tzname(vm: &VirtualMachine) -> crate::builtins::PyTupleRef {
224221
use crate::builtins::tuple::IntoPyTuple;
225222
let info = get_tz_info();
226-
let standard = widestring::decode_utf16_lossy(info.StandardName).filter(|&c| c != '\0').collect::<String>();
227-
let daylight = widestring::decode_utf16_lossy(info.DaylightName).filter(|&c| c != '\0').collect::<String>();
223+
let standard = widestring::decode_utf16_lossy(info.StandardName)
224+
.filter(|&c| c != '\0')
225+
.collect::<String>();
226+
let daylight = widestring::decode_utf16_lossy(info.DaylightName)
227+
.filter(|&c| c != '\0')
228+
.collect::<String>();
228229
let tz_name = (&*standard, &*daylight);
229230
tz_name.into_pytuple(vm)
230231
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.