mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 19:24:57 +08:00
Fix copy-paste error in str error message
This commit is contained in:
1 parent
5da0432dda
commit
b8608bd513
1 file changed
+1
-1
+1
-1
@@ -216,7 +216,7 @@ fn builtin_str(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
PyObjectKind::String { ref value } => args.args[0].borrow().str(),
|
||||
_ => {
|
||||
return Err(vm.context()
|
||||
.new_str("TypeError: object of this type has no len()".to_string()))
|
||||
.new_str("TypeError: object of this type cannot be converted to str".to_string()))
|
||||
},
|
||||
};
|
||||
Ok(vm.new_str(s))
|
||||
|
||||
Reference in new issue
Block a user