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
I think this is possibly arguably only a minor breaking change because most users aren't looking at the unit success type currently returned. One usage I could see this breaking would be users manually writing out error propagation with a match. If that's unacceptable this could be yet another conditional thing in codegen.rs, although the permutations might be getting a bit out of hand there.
Concretely I think this would be implemented by changing the infallible setters from fn set_foo(&mut self, arg: Reader) to fn set_foo(&mut self, arg: Reader) -> &mut Self and the fallible setters to fn set_foo(self, arg: Reader) -> capnp::Result<&mut Self>.
The text was updated successfully, but these errors were encountered:
That is I want to be able to do
I think this is possibly arguably only a minor breaking change because most users aren't looking at the unit success type currently returned. One usage I could see this breaking would be users manually writing out error propagation with a match. If that's unacceptable this could be yet another conditional thing in
codegen.rs
, although the permutations might be getting a bit out of hand there.Concretely I think this would be implemented by changing the infallible setters from
fn set_foo(&mut self, arg: Reader)
tofn set_foo(&mut self, arg: Reader) -> &mut Self
and the fallible setters tofn set_foo(self, arg: Reader) -> capnp::Result<&mut Self>
.The text was updated successfully, but these errors were encountered: