Skip to content

Commit f22e042

Browse files
authored
Change PositionId validation check from ASCII to UTF-8 (#3105)
1 parent 282ebcb commit f22e042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/model/src/identifiers/position_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::{
2020
hash::Hash,
2121
};
2222

23-
use nautilus_core::correctness::{FAILED, check_valid_string_ascii};
23+
use nautilus_core::correctness::{FAILED, check_valid_string_utf8};
2424
use ustr::Ustr;
2525

2626
/// Represents a valid position ID.
@@ -44,7 +44,7 @@ impl PositionId {
4444
/// PyO3 requires a `Result` type for proper error handling and stacktrace printing in Python.
4545
pub fn new_checked<T: AsRef<str>>(value: T) -> anyhow::Result<Self> {
4646
let value = value.as_ref();
47-
check_valid_string_ascii(value, stringify!(value))?;
47+
check_valid_string_utf8(value, stringify!(value))?;
4848
Ok(Self(Ustr::from(value)))
4949
}
5050

0 commit comments

Comments
 (0)