fix: loss of order in Lua sequence table for inter-thread data exchange (#1457)

This commit is contained in:
三咲雅 · Misaki Masa 2024-08-10 13:28:51 +08:00 committed by GitHub
parent 17c7003426
commit 36381e676f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ impl Sendable {
}
if map.len() == i as usize - 1 {
Data::List(map.into_values().collect())
Data::List((1..i).map(|i| map.remove(&DataKey::Integer(i)).unwrap()).collect())
} else {
Data::Dict(map)
}