You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file encoding.rs function pub fn encode_attributes(attributes: &str) -> VcxResult<String> takes &str as argument - it then tries to parse it to Hashmap<String, serde_json::Value>.
Task:
change the function input and output types to be less generic than just &str and String - for example, it could look like
and hence making the function declaration communicate more about the input it requires and output it's producing.
Obivously, this will have impact on all of the code calling the function, so you will have to update that appropriately. The main place where encode_attributes is being called from. You could transitively continue applying this typing improvements on calling functions.
Additionally, you can try to refactor the function implementation itself as it's quite long.
The text was updated successfully, but these errors were encountered:
In file
encoding.rs
functionpub fn encode_attributes(attributes: &str) -> VcxResult<String>
takes&str
as argument - it then tries to parse it toHashmap<String, serde_json::Value>
.Task:
&str
andString
- for example, it could look likeand hence making the function declaration communicate more about the input it requires and output it's producing.
Obivously, this will have impact on all of the code calling the function, so you will have to update that appropriately. The main place where
encode_attributes
is being called from. You could transitively continue applying this typing improvements on calling functions.Additionally, you can try to refactor the function implementation itself as it's quite long.
The text was updated successfully, but these errors were encountered: