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
If config: zenoh::Config then config.insert_json5("transport/unicast/max_links:2") succeeds while config.insert_json5("connect/retry/period_init_ms:500") fails with Str(\"unknown key\").
This is because the connect/retry field is an Option of a struct while transport/unicast is simply a struct. validated_struct_macros doesn't allow using recursive accessors unless the target is a simple struct:
Describe the bug
If
config: zenoh::Config
thenconfig.insert_json5("transport/unicast/max_links:2")
succeeds whileconfig.insert_json5("connect/retry/period_init_ms:500")
fails withStr(\"unknown key\")
.This is because the
connect/retry
field is anOption
of a struct whiletransport/unicast
is simply a struct.validated_struct_macros
doesn't allow using recursive accessors unless the target is a simple struct:https://github.com/p-avital/validated-struct-macros-rs/blob/048537b0ce74a7c961857c6de43436325477ffac/src/lib.rs#L392-L411
https://github.com/p-avital/validated-struct-macros-rs/blob/048537b0ce74a7c961857c6de43436325477ffac/src/lib.rs#L37-L44
The workaround is to write
config.insert_json5("connect/retry:{period_init_ms:500}")
To reproduce
N/A
System info
The text was updated successfully, but these errors were encountered: