Update pyo3-macros-backend/src/from_pyobject.rs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
Jacob Turner 2021-07-31 20:38:44 +02:00 committed by GitHub
parent d3208b005e
commit 363383ea84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -84,10 +84,10 @@ impl<'a> Enum<'a> {
let mut err_reasons = String::new();
#(#var_extracts)*
let type_name = obj.get_type().name()?;
let mut err_msg = format!("failed to extract enum {} ('{}')\n",
let err_msg = format!("failed to extract enum {} ('{}')\n{}",
#ty_name,
#error_names);
err_msg.push_str(&err_reasons);
#error_names,
&err_reasons);
Err(pyo3::exceptions::PyTypeError::new_err(err_msg))
)
}