mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
SharedString and SharedVector should be Send
SharedString used to be Send, but this regress when we moved the implementation over to SharedVector. This regression was cought trying to compile CargoUI with master
This commit is contained in:
parent
dc7942fa86
commit
9440d3c003
2 changed files with 35 additions and 0 deletions
|
@ -86,6 +86,9 @@ pub struct SharedVector<T> {
|
|||
inner: NonNull<SharedVectorInner<T>>,
|
||||
}
|
||||
|
||||
// Safety: We use atomic reference counting, and if T is Send, we can send the vector to another thread
|
||||
unsafe impl<T: Send> Send for SharedVector<T> {}
|
||||
|
||||
impl<T> Drop for SharedVector<T> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue