We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d7f211 commit 9db046fCopy full SHA for 9db046f
src/serializers/type_serializers/uuid.rs
@@ -1,7 +1,7 @@
1
use std::borrow::Cow;
2
3
-use pyo3::prelude::*;
4
use pyo3::types::PyDict;
+use pyo3::{intern, prelude::*};
5
use uuid::Uuid;
6
7
use crate::definitions::DefinitionsBuilder;
@@ -12,7 +12,8 @@ use super::{
12
};
13
14
pub(crate) fn uuid_to_string(py_uuid: &Bound<'_, PyAny>) -> PyResult<String> {
15
- let uuid_int_val: u128 = py_uuid.getattr("int")?.extract()?;
+ let py = py_uuid.py();
16
+ let uuid_int_val: u128 = py_uuid.getattr(intern!(py, "int"))?.extract()?;
17
let uuid = Uuid::from_u128(uuid_int_val);
18
Ok(uuid.to_string())
19
}
0 commit comments