Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Auto-format: cargo fmt --all
  • Loading branch information
github-actions[bot] committed Feb 14, 2026
commit ae2872db71622e2d39ce24009e42750c1650d0fb
9 changes: 5 additions & 4 deletions crates/vm/src/stdlib/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,10 @@ mod decl {

/// Extract fields from StructTimeData into a libc::tm for mktime.
#[cfg(any(unix, windows))]
pub(super) fn tm_from_struct_time(t: &StructTimeData, vm: &VirtualMachine) -> PyResult<libc::tm> {
pub(super) fn tm_from_struct_time(
t: &StructTimeData,
vm: &VirtualMachine,
) -> PyResult<libc::tm> {
let invalid_tuple = || vm.new_type_error("mktime(): illegal time tuple argument");
let year: i32 = t
.tm_year
Expand Down Expand Up @@ -1002,9 +1005,7 @@ mod decl {
}
let secs = float.floor();
if secs < libc::time_t::MIN as f64 || secs > libc::time_t::MAX as f64 {
return Err(
vm.new_overflow_error("timestamp out of range for platform time_t")
);
return Err(vm.new_overflow_error("timestamp out of range for platform time_t"));
}
Ok(secs as libc::time_t)
}
Expand Down
Loading