I've searched a bit and can't seem to find an answer for this, so this is probably a duplicate.
I have a String like this (the actual strings are not literals):
let param_type_raw = String::from("address");
I want to deserialize it into the type ethabi::ParamType, which implements the Deserializer trait. So far, I've came up with this:
let param_type: ParamType = serde_json::from_str(format!("\"{}\"", param_type_raw).as_str())?;
However, it seems extremely redundant to convert the string into a JSON string just to deserialize it into ParamType. I'm certain there must be a better way of just deserializing a String by itself.