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
Not sure I understand the question fully. All generated message types do implement Default, so the implementation of that method and const could simply be Default::default(). I don’t see a connection between your question and unknown fields, could you elaborate?
I did not know that. I read the discussion here: https://github.com/danburkert/prost/issues/2#issuecomment-402772743 in which @per-gron writes "This would work if all generated structs would #[derive(Default)] (or equivalent), which seems like a sensible thing to do in general because Protobufs in general assume that no code breaks from just adding a field." And I assumed that default was NOT derived. Further, I saw code in that PR https://github.com/danburkert/prost/pull/117/files#diff-6d0f1e2a66e5c7be23fcd64650dc1044R3 which appeared to be testing the addition of default handling, though I admit that now I am not sure where the new default handling code is in that PR which is to be tested.
I see that this has already been addressed in https://github.com/danburkert/prost/pull/117 . I'm ending up with a lot of boring code like:
So that I can send messages with only a few fields set.
The text was updated successfully, but these errors were encountered: