Removed stray newline character from error message

This commit is contained in:
R2D2 2021-06-09 14:23:16 +02:00
parent e6da1ebc73
commit ec40446fa3
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ impl<'a> Container<'a> {
s.get_item(#i).extract().map_err(|inner| {
let gil = Python::acquire_gil();
let py = gil.python();
let err_msg = format!("{}: {}\n",
let err_msg = format!("{}: {}",
#error_msg,
inner.instance(py).str().unwrap());
pyo3::exceptions::PyTypeError::new_err(err_msg)

View File

@ -203,7 +203,7 @@ fn test_struct_nested_type_errors() {
assert!(test.is_err());
assert_eq!(
test.unwrap_err().to_string(),
"TypeError: failed to extract field Baz.tup: failed to extract field Tuple.1: \'str\' object cannot be interpreted as an integer\n"
"TypeError: failed to extract field Baz.tup: failed to extract field Tuple.1: \'str\' object cannot be interpreted as an integer"
);
}