uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Can't pass hashmap to procmacro function

Open mhammond opened this issue 2 years ago • 0 comments

Trying to copy rondpoint's hashmap test

#[uniffi::export]
fn return_hashmap(h: HashMap<i8, u64>) -> HashMap<i8, u64> {
    h
}

fails trying to call it in Python:

  File "/Users/skip/src/moz/uniffi-rs/target/tmp/uniffi-fixture-proc-macro-b83c1fa2d45093c5/proc_macro.py", line 1883, in write
    for (key, value) in items.items():
AttributeError: 'set' object has no attribute 'items'

mhammond avatar Oct 01 '23 02:10 mhammond