forked from Rust-related/RustPython
apply cargo fmt
This commit is contained in:
@@ -678,7 +678,7 @@ fn math_fmod(x: IntoPyFloat, y: IntoPyFloat, vm: &VirtualMachine) -> PyResult<f6
|
||||
fn math_remainder(x: IntoPyFloat, y: IntoPyFloat, vm: &VirtualMachine) -> PyResult<f64> {
|
||||
let x = x.to_f64();
|
||||
let y = y.to_f64();
|
||||
|
||||
|
||||
if x.is_finite() && y.is_finite() {
|
||||
if y == 0.0 {
|
||||
return Err(vm.new_value_error("math domain error".to_owned()));
|
||||
@@ -698,7 +698,7 @@ fn math_remainder(x: IntoPyFloat, y: IntoPyFloat, vm: &VirtualMachine) -> PyResu
|
||||
return Ok(1.0_f64.copysign(x) * r);
|
||||
}
|
||||
if x.is_finite() && y.is_infinite() {
|
||||
return Ok(fmod(x, y))
|
||||
return Ok(fmod(x, y));
|
||||
}
|
||||
if x.is_infinite() && y == 0.0 {
|
||||
return Err(vm.new_value_error("math domain error".to_owned()));
|
||||
|
||||
Reference in New Issue
Block a user