Skip to content
  • Zeeshan Ali Khan's avatar
    zm: prop setter to allow non-ref value arg · 59f28911
    Zeeshan Ali Khan authored
    We now handle 3 different types of property value types of setters
    differently:
    
    * For reference arg, we convert from `&Value` (so `TryFrom<&Value<'_>>` is
      required).
    
    * For argument type with lifetimes, we convert from `Value` (so
      `TryFrom<Value<'_>>` is required).
    
    * For all other arg types, we convert the passed value to `OwnedValue`
      first and then pass it as `Value` (so `TryFrom<Value<'static>>` is
      required). This implies possible implicit allocation/cloning but what
      can we do. 🤷
    
    Fixes #248.
    59f28911