Skip to content
Merged
Show file tree
Hide file tree
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
rework SchedParam
  • Loading branch information
youknowone committed Feb 3, 2026
commit 674d7dbb3afbb17b64eb85baa375d601e8dbfb6f
10 changes: 4 additions & 6 deletions crates/stdlib/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2206,9 +2206,9 @@ mod _socket {
Some(t) => {
let f = t.into_float();
if f.is_nan() {
return Err(vm.new_value_error(
"Invalid value NaN (not a number)".to_owned(),
));
return Err(
vm.new_value_error("Invalid value NaN (not a number)".to_owned())
);
}
if f < 0.0 || !f.is_finite() {
return Err(vm.new_value_error("Timeout value out of range".to_owned()));
Expand Down Expand Up @@ -3388,9 +3388,7 @@ mod _socket {
Some(t) => {
let f = t.into_float();
if f.is_nan() {
return Err(vm.new_value_error(
"Invalid value NaN (not a number)".to_owned(),
));
return Err(vm.new_value_error("Invalid value NaN (not a number)".to_owned()));
}
if f < 0.0 || !f.is_finite() {
return Err(vm.new_value_error("Timeout value out of range".to_owned()));
Expand Down
4 changes: 1 addition & 3 deletions crates/vm/src/convert/try_from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ impl TryFromObject for core::time::Duration {
if let Some(float) = obj.downcast_ref::<PyFloat>() {
let f = float.to_f64();
if f.is_nan() {
return Err(
vm.new_value_error("Invalid value NaN (not a number)".to_owned())
);
return Err(vm.new_value_error("Invalid value NaN (not a number)".to_owned()));
}
if f < 0.0 {
return Err(vm.new_value_error("negative duration".to_owned()));
Expand Down
Loading
Loading