mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix Error Message
This commit is contained in:
1 parent
acbc517b55
commit
ac4fc783ae
1 file changed
+1
-1
@@ -180,7 +180,7 @@ fn float_from_string(val: PyObjectRef, vm: &VirtualMachine) -> PyResult<f64> {
|
||||
};
|
||||
float_ops::parse_bytes(b).ok_or_else(|| {
|
||||
val.repr(vm)
|
||||
.map(|repr| vm.new_value_error(format!("could not convert string to float: '{repr}'")))
|
||||
.map(|repr| vm.new_value_error(format!("could not convert string to float: {repr}")))
|
||||
.unwrap_or_else(|e| e)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user