Skip to content

Commit 2e5dfed

Browse files
Auto-format: cargo fmt --all
1 parent eb72dfc commit 2e5dfed

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

crates/stdlib/src/socket.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,9 +2206,9 @@ mod _socket {
22062206
Some(t) => {
22072207
let f = t.into_float();
22082208
if f.is_nan() {
2209-
return Err(vm.new_value_error(
2210-
"Invalid value NaN (not a number)".to_owned(),
2211-
));
2209+
return Err(
2210+
vm.new_value_error("Invalid value NaN (not a number)".to_owned())
2211+
);
22122212
}
22132213
if f < 0.0 || !f.is_finite() {
22142214
return Err(vm.new_value_error("Timeout value out of range".to_owned()));
@@ -3388,9 +3388,7 @@ mod _socket {
33883388
Some(t) => {
33893389
let f = t.into_float();
33903390
if f.is_nan() {
3391-
return Err(vm.new_value_error(
3392-
"Invalid value NaN (not a number)".to_owned(),
3393-
));
3391+
return Err(vm.new_value_error("Invalid value NaN (not a number)".to_owned()));
33943392
}
33953393
if f < 0.0 || !f.is_finite() {
33963394
return Err(vm.new_value_error("Timeout value out of range".to_owned()));

crates/vm/src/convert/try_from.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ impl TryFromObject for core::time::Duration {
127127
if let Some(float) = obj.downcast_ref::<PyFloat>() {
128128
let f = float.to_f64();
129129
if f.is_nan() {
130-
return Err(
131-
vm.new_value_error("Invalid value NaN (not a number)".to_owned())
132-
);
130+
return Err(vm.new_value_error("Invalid value NaN (not a number)".to_owned()));
133131
}
134132
if f < 0.0 {
135133
return Err(vm.new_value_error("negative duration".to_owned()));

crates/vm/src/stdlib/posix.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,10 +2573,7 @@ mod posix_sched {
25732573
}
25742574

25752575
#[cfg(not(target_env = "musl"))]
2576-
fn convert_sched_param(
2577-
obj: &PyObjectRef,
2578-
vm: &VirtualMachine,
2579-
) -> PyResult<libc::sched_param> {
2576+
fn convert_sched_param(obj: &PyObjectRef, vm: &VirtualMachine) -> PyResult<libc::sched_param> {
25802577
use crate::{builtins::PyTuple, class::StaticType};
25812578
if !obj.fast_isinstance(PySchedParam::static_type()) {
25822579
return Err(vm.new_type_error("must have a sched_param object".to_owned()));
@@ -2660,4 +2657,3 @@ mod posix_sched {
26602657
}
26612658
}
26622659
}
2663-

0 commit comments

Comments
 (0)