Skip to content

Commit

Permalink
Revert "use little endian int (#1372)" (#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored Aug 5, 2024
1 parent 81106d9 commit f79d49b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/serializers/type_serializers/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ use super::{
pub(crate) fn uuid_to_string(py_uuid: &Bound<'_, PyAny>) -> PyResult<String> {
let py = py_uuid.py();
let uuid_int_val: u128 = py_uuid.getattr(intern!(py, "int"))?.extract()?;
// we use a little endian conversion for compatibility across platforms, see https://github.com/pydantic/pydantic-core/pull/1372
let uuid = Uuid::from_u128(uuid_int_val.to_le());
let uuid = Uuid::from_u128(uuid_int_val);
Ok(uuid.to_string())
}

Expand Down

0 comments on commit f79d49b

Please sign in to comment.