Gulshan Singh

Results 164 comments of Gulshan Singh

Currently the generated `*Result` structs have two fields, `success` and `ouch`, where `ouch` is an `Option`. Why not just have a single field that's a `Result`?

So I'm going to start working on this. I'm going to make each `*Result` struct have one field, which will be the value of type `T` if there's no exception,...

So a method like `add` in the tutorial would return a `TResult`, and a method like `calculate` would return a `TResult`, where `CalculatorException` is defined as: ``` pub enum CalculatorException...

And this is bikeshedding, but maybe naming it `CalculatorErr` and naming the variant `InvalidOperationErr(InvalidOperation)` might be better/more rust-y.

I think having `UserErr` as one of the variants of `ThriftErr` isn't a bad idea, but I think in that case we should clean up `ThriftErr`. Many of the variants...

I started implementing this, and after removing the `ouch` field in some of the result structs, I realized the structs were essentially useless. I won't be messing with this while...

> Indeed looks like the Result struct (which was more or less directly copied from the C++ design) can be replaced by Rust enums. I'm not replacing all of the...

Sorry for the delay, I needed some time to think about this. This won't work with any other server implementations, we have to go the same route as the other...

Can you clarify what this means? Are you talking about `optional` fields in the thrift specification or something else?

It turns out that with the new system of generating code (with rust macros), this is a bit harder to review as there's no diff of the changes to generated...