Skip to content

Commit 71f025e

Browse files
committed
Add Send trait to GString
1 parent 9ae2d36 commit 71f025e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

godot-core/src/builtin/string/gstring.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ pub struct GString {
7272
_opaque: OpaqueString,
7373
}
7474

75+
// SAFETY: The Godot implementation of String uses an atomic copy on write pointer, making this thread-safe as we never write to it unless we own it.
76+
unsafe impl Send for GString {}
77+
7578
impl GString {
7679
/// Construct a new empty `GString`.
7780
pub fn new() -> Self {

0 commit comments

Comments
 (0)